Skip to content

Commit

Permalink
Fixed some exception issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Caudrelier committed Feb 25, 2015
1 parent 2947300 commit 0229448
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/burp/ExtractParamDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ private class ExtractTask extends SwingWorker<Void, ResValue> {
private Pattern inputFieldPattern;
private final Pattern contentTypePattern = Pattern.compile("^Content-Type: (.*)$");
private Pattern[] excludedPatterns;
private static final String ILLEGAL_VALUE_MESS = "Invalid escaped value during URLDecode, ignoring decoding.";

private boolean isExcluded(String[] headers) {
if (headers != null && excludedPatterns.length > 0) {
Expand Down Expand Up @@ -494,9 +495,7 @@ protected Void doInBackground() {
processMessage(requestList[i].getRequest(), url,i);
if (searchResponse)
processMessage(requestList[i].getResponse(), url,i);
}


}
} catch (Exception e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -544,6 +543,10 @@ private void processMessage(byte[] message, URL url, int proxyId) {
svalue = URLDecoder.decode(svalue, "UTF-8");
} catch (UnsupportedEncodingException e) {
System.out.println(e.getMessage());
mCallbacks.issueAlert(e.getMessage());
} catch (IllegalArgumentException e) {
System.out.println(ILLEGAL_VALUE_MESS);
mCallbacks.issueAlert(ILLEGAL_VALUE_MESS);
}
publish(new ResValue(svalue, url,proxyId));
}
Expand Down

0 comments on commit 0229448

Please sign in to comment.