ashenchowthee / zaproxy

Automatically exported from code.google.com/p/zaproxy
0 stars 0 forks source link

Search "All" option not working #1615

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download any one of the last two weekly ZAP releases (27/04/2015) and 
configure it with firefox
2. Visit www.google.com and make sure that traffic is loaded in history tab
3. In the search tab, search for any string.

What is the expected output? What do you see instead?
Expected output is the result set of messages that match the search string. 
However, I see that no results are displayed

What version of the product are you using? On what operating system?
I have this issue in the 27/04/2015 weekly deliverable and the 21/04/2015. I am 
using Windows 7 64 bit operating system.

Please provide any additional information below.
Even though the search action does not trigger any errors in the log, I see an 
error in the log that said:
ERROR ZAP$UncaughtExceptionLogger - Exception in thread "ZAP-SearchThread"

Original issue reported on code.google.com by 6.avin...@gmail.com on 28 Apr 2015 at 8:42

GoogleCodeExporter commented 9 years ago
I was able to reproduce the issue with "All" option, it was working with the 
others ("URL", "Request", "Response", "Header", "HTTP Fuzz Results").
Could you confirm that's only the "All" option that's not working for you too?

The issue also affects version 2.4.0.

Regarding the error in the log, is the stack trace also available or the 
exception message?

Original comment by THC...@gmail.com on 28 Apr 2015 at 10:18

GoogleCodeExporter commented 9 years ago
You are correct, the issue is only for the "All" option.
I am not 100% sure whether the error is related to this issue. But this is the 
stacktrace shown.

2015-04-28 10:18:28,964 [ZAP-SearchThread] ERROR ZAP$UncaughtExceptionLogger - 
Exception in thread "ZAP-SearchThread"
java.util.regex.PatternSyntaxException: Unexpected internal error near index 2
a\
  ^
    at java.util.regex.Pattern.error(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.util.regex.Pattern.<init>(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at org.zaproxy.zap.extension.search.SearchThread.search(SearchThread.java:105)
    at org.zaproxy.zap.extension.search.SearchThread.run(SearchThread.java:97)

Original comment by 6.avin...@gmail.com on 28 Apr 2015 at 11:41

GoogleCodeExporter commented 9 years ago
Thanks for confirmation!

Yes, it's another issue, ZAP should inform about incorrect regular expressions.
Were you searching using the API when that error was logged? The UI should be 
already warning about invalid regexes (and not attempt the search).

Original comment by THC...@gmail.com on 28 Apr 2015 at 3:02

GoogleCodeExporter commented 9 years ago
Yes, it looks like another issue. This happened while I was confirming the 
issuw with the search "All" option. I tried many random strings and one of them 
ended up being an incorrect RegEx. However, I did not receive any warnings 
about the incorrect regex. Frankly speaking I don't know where this warning 
will be displayed. However, it was not obvious. 

After receiving your previous reply, I tried with the incorrect regular 
expression "?" (without quotes) for each search option("All","URL", "Request", 
"Response", "Header", "HTTP Fuzz Results") and it did not seem to produce a 
warning. However, for each attempt, an exception is raised in zap.log. For 
example:
2015-04-28 18:10:22,768 [ZAP-SearchThread] ERROR ZAP$UncaughtExceptionLogger - 
Exception in thread "ZAP-SearchThread"
java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
?
^
    at java.util.regex.Pattern.error(Unknown Source)
    at java.util.regex.Pattern.sequence(Unknown Source)
    at java.util.regex.Pattern.expr(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.util.regex.Pattern.<init>(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at org.zaproxy.zap.extension.search.SearchThread.search(SearchThread.java:105)
    at org.zaproxy.zap.extension.search.SearchThread.run(SearchThread.java:97)

Original comment by 6.avin...@gmail.com on 28 Apr 2015 at 4:17

GoogleCodeExporter commented 9 years ago
Ah! The validation is only being done with the "Search" button. I'll raise a 
new issue for that one.

Thanks!

Original comment by THC...@gmail.com on 28 Apr 2015 at 9:57

GoogleCodeExporter commented 9 years ago
Raised as Issue 1619.

Original comment by THC...@gmail.com on 30 Apr 2015 at 2:05

GoogleCodeExporter commented 9 years ago
r6089

Original comment by THC...@gmail.com on 4 May 2015 at 7:59

GoogleCodeExporter commented 9 years ago
Merged into branch 2.4 (r6096).

Original comment by THC...@gmail.com on 5 May 2015 at 4:00

GoogleCodeExporter commented 9 years ago
ZAP has been migrated to github

This issue will be on github issues with the same ID: 
https://github.com/zaproxy/zaproxy/issues

Original comment by psii...@gmail.com on 5 Jun 2015 at 9:18