fix: hand DiamWall 513 challenges to the bypasser - #1400
Open
vansh-nagar wants to merge 2 commits into
Open
vansh-nagar wants to merge 2 commits into
vansh-nagar wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Update the internal bypasser’s challenge and unsolved-page detection for DiamWall.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Routes DiamWall HTTP 513 challenge responses to the configured browser bypasser while preserving normal 513 handling.
Changes:
- Adds DiamWall challenge detection.
- Hands matching responses to the bypasser.
- Adds regression tests for challenge and non-challenge responses.
The internal browser bypasser still does not recognize DiamWall challenges, so the handoff may fail to solve them.
| File | Summary |
|---|---|
tests/download/test_http_challenge_513.py |
Tests challenge routing and normal 513 behavior. |
shelfmark/download/http.py |
Detects and hands off DiamWall 513 responses. |
shelfmark/bypass/challenge.py |
Adds DiamWall detection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Recognize DiamWall interstitials in both the HTTP retry path and the internal browser helper. HTTP 513 challenge responses go directly to the configured bypasser, while ordinary 513 responses keep the existing error behavior.
Fixes #1386
Testing
uv run --frozen --extra browser pytest -q -n 0 tests/download/test_http_challenge_513.py tests/bypass/test_internal_bypasser.py: 27 passed