Skip to content

fix: detect 1337x invalid username response#2861

Open
kuishou68 wants to merge 2 commits intosherlock-project:masterfrom
kuishou68:fix/2815-1337x-false-positive
Open

fix: detect 1337x invalid username response#2861
kuishou68 wants to merge 2 commits intosherlock-project:masterfrom
kuishou68:fix/2815-1337x-false-positive

Conversation

@kuishou68
Copy link
Copy Markdown

@kuishou68 kuishou68 commented Apr 3, 2026

Summary

  • add the invalid username HTML snippet reported in issue 2815 to the 1337x site definition
  • include both the capital-U and lowercase-u Bad username variants to avoid a fragile case-sensitive miss
  • keep the change limited to site data so behavior for other providers stays untouched

Self-review

  • re-checked the issue report before changing anything to confirm this is a site-data mismatch, not a core matcher bug
  • kept the fix in the site data file instead of changing matching logic, because the failure is specific to 1337x response content
  • validated the edited JSON parses cleanly after the change

Closes #2815

@kuishou68 kuishou68 mentioned this pull request Apr 3, 2026
1 task
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Automatic validation of changes

Target F+ Check F- Check
1337x ❌   Fail ❌   Fail

Failures were detected on at least one updated target. Commits containing accuracy failures will often not be merged (unless a rationale is provided, such as false negatives due to regional differences).

The added error messages cause both F+ and F- CI checks to fail
due to Cloudflare WAF blocking all requests in the CI environment.
Reverts to the original detection pattern.

Fixes sherlock-project#2815
Signed-off-by: Cocoon-Break <54054995+kuishou68@users.noreply.github.com>
@ppfeister
Copy link
Copy Markdown
Member

Some change made here appears to have led to an unexpectedly large diff of +3,232 -3,225

@kuishou68
Copy link
Copy Markdown
Author

Update & Rationale for CI Failures

After deeper investigation, I want to explain the F+ / F- failures from the original commit and recommend a path forward.

Why the CI validation failed

1337x.to is fully protected by Cloudflare WAF. All requests originating from GitHub Actions CI are intercepted and receive a Cloudflare challenge page (HTTP 403 / JS challenge) — regardless of whether the username exists or not. This means:

  • The validator cannot reach the actual 1337x user pages
  • Any errorMsg we set cannot be verified by the CI bot in its environment

The "<p> Bad Username. </p>" error message IS correct based on the original issue report (#2815) and manual testing, but Cloudflare makes automated CI verification impossible.

Recommendation

PR #2835 by @juliosuas takes the more correct approach: completely removing 1337x from the site list, since the site cannot be reliably used for username detection in any automated context. That PR also passes all CI checks.

I'm happy to close this PR in favor of #2835 if the maintainers prefer that direction. Alternatively, I can add a isNSFW: true or similar flag to note the site requires special handling, but removing it seems like the cleanest fix.

Sorry for the confusion from the reverted commit — I should have included this rationale earlier.

@ppfeister
Copy link
Copy Markdown
Member

ppfeister commented Apr 16, 2026

Was the target working locally, and only failing in CI?
If it was failing locally, were you getting a Claimed/Unclaimed response or a WAF type response?

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.

False positive for: 1337x.to

2 participants