Skip to content

fix: check browser sidecar pages for a challenge and stop flagging Cloudflare's passive script - #64

Merged
flthibaud merged 1 commit into
developfrom
fix/solver-challenge-check
Nov 11, 2026
Merged

flthibaud merged 1 commit into
developfrom
fix/solver-challenge-check

Conversation

@flthibaud

Copy link
Copy Markdown
Owner

Two linked problems in the anti-bot ladder.

Sidecar answers were never checked (#48). A page returned by the browser sidecar went straight to readability: no status check, no detectChallenge. If the browser also ended on the block page, it was stored as the article.

  • Both solver.fetch call sites now return errChallenge unless the status is 2xx and detectChallenge finds nothing.

Ordinary Cloudflare pages looked like challenges (#29). /cdn-cgi/challenge-platform/ was a marker, but Cloudflare's passive jsd script puts that path into normal 200 pages. With the new check above, a page the browser really solved would have been thrown away, so both are fixed together.

  • The marker is replaced by _cf_chl_opt, which only real interstitials carry.

Tests: the existing 200-interstitial case now uses a real interstitial body; new cases for a large article carrying the jsd script (challengeNone), a sidecar article carrying it (returned as the page), and a sidecar block page (403 and 200 interstitial, both errChallenge).

Tested with gofmt, go vet ./... and go test -race ./... against a migrated postgres:16 (no test skipped).

Closes #48
Closes #29

@flthibaud

Copy link
Copy Markdown
Owner Author

Review: OK to merge.

@flthibaud
flthibaud merged commit 65e60e5 into develop Nov 11, 2026
5 checks passed
@flthibaud
flthibaud deleted the fix/solver-challenge-check branch November 11, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant