Menu

#1619 Search regex might not be validated

Committed
nobody
None
Medium
Defect
2015-05-04
2015-04-30
Anonymous
No

Originally created by: THC...@gmail.com
Originally owned by: THC...@gmail.com

From Issue 1615.

Steps to reproduce the issue:
1. Run ZAP;
2. Select the "Search" tab;
3. Add an invalid regex, for example "*", and press Enter;
4. Note that no dialogue is shown indicating that the regex is invalid, also in the log there's an exception:
[...]
33606 [ZAP-SearchThread] ERROR org.zaproxy.zap.ZAP$UncaughtExceptionLogger  - Exception in thread "ZAP-SearchThread"
java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
*
^
    at java.util.regex.Pattern.error(Pattern.java:1924)
    at java.util.regex.Pattern.sequence(Pattern.java:2090)
    at java.util.regex.Pattern.expr(Pattern.java:1964)
    at java.util.regex.Pattern.compile(Pattern.java:1665)
    at java.util.regex.Pattern.<init>(Pattern.java:1337)
    at java.util.regex.Pattern.compile(Pattern.java:1047)
    at org.zaproxy.zap.extension.search.SearchThread.search(Unknown Source)
    at org.zaproxy.zap.extension.search.SearchThread.run(Unknown Source)
[...]

Remarks:
If the search is started by clicking the "Search" button the regex is validated.

ZAP Version:
Version 2.4.0 (previous versions are also affected)

Related

Tickets: #1615

Discussion


Log in to post a comment.

MongoDB Logo MongoDB