Skip to content

Keep WebSocket responses on normal closure - #6173

Merged
stamparm merged 1 commit into
sqlmapproject:masterfrom
bingdongni:fix/websocket-normal-close
Nov 4, 2026
Merged

stamparm merged 1 commit into
sqlmapproject:masterfrom
bingdongni:fix/websocket-normal-close

Conversation

@bingdongni

Copy link
Copy Markdown
Contributor

When a WebSocket server sends a response and then a normal close frame, sqlmap treats the connection as a failure and loses the response. This affects both the initial frame-count calibration and later responses with fewer frames.

Treat a normal close at a message boundary as the end of the response. Abnormal closes, truncated frames, and closure during a fragmented message still fail.

Tests:

  • Python 3.12: 2,749 tests run, 15 skipped.
  • PyPy 2.7 on Windows: 2,741 tests run, 34 skipped, excluding test_replication. Its six SQLite teardown errors also reproduce on unmodified master.
  • Verified against a loopback WebSocket server. Also applied this change together with Preserve custom Host headers for WebSocket requests #6172 and ran their focused tests on Python 2 and 3.
  • Pyflakes and git diff --check passed.

@stamparm
stamparm merged commit b333a14 into sqlmapproject:master Nov 4, 2026
3 checks passed
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.

2 participants