From 0229448740b7b821786952f3ca93e832e5a86107 Mon Sep 17 00:00:00 2001 From: Gabriel Caudrelier Date: Wed, 25 Feb 2015 17:46:34 -0600 Subject: [PATCH] Fixed some exception issues --- src/burp/ExtractParamDialog.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/burp/ExtractParamDialog.java b/src/burp/ExtractParamDialog.java index ef1c9ba..cf2dbdd 100644 --- a/src/burp/ExtractParamDialog.java +++ b/src/burp/ExtractParamDialog.java @@ -441,6 +441,7 @@ private class ExtractTask extends SwingWorker { 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) { @@ -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(); } @@ -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)); }