Skip to content

Improve username URL encoding and fix Reddit verification page false positives#2947

Open
lipeize689-prog wants to merge 2 commits into
sherlock-project:masterfrom
lipeize689-prog:fix/reddit-verification-waf-detection
Open

Improve username URL encoding and fix Reddit verification page false positives#2947
lipeize689-prog wants to merge 2 commits into
sherlock-project:masterfrom
lipeize689-prog:fix/reddit-verification-waf-detection

Conversation

@lipeize689-prog
Copy link
Copy Markdown

Summary
This PR improves username URL handling and fixes a real false-positive issue on Reddit.

  1. Safer URL interpolation
    I added [encode_username_for_url()] and used it for URL-based username interpolation to avoid breaking URL structure when usernames contain special characters (like '/').

  2. Reddit verification/challenge page detection
    Reddit sometimes returns a verification/challenge page instead of a normal user-not-found response.

Previously, this could be misclassified as [CLAIMED], causing a false positive.

To address this, I added [is_reddit_verification_page()] and integrated it into the main detection flow so these pages are classified as [QueryStatus.WAF] with a clearer context string: Reddit verification page.

  1. Improved diagnostics
    I also updated the [--dump-response] output and WAF terminal output so the detection reason is easier to understand.

Tests
Added coverage for:

URL encoding behavior
Reddit verification-page detection
Main-flow WAF classification for Reddit

@lipeize689-prog lipeize689-prog requested a review from ppfeister as a code owner May 8, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant