Skip to content

Reject non-SP proxy CONNECT whitespace - #1324

Merged
fewensa merged 1 commit into
mainfrom
codeon/fewensa/FWN-4/a6-eca2f518728e4cfeb1c872994c4e836c
Oct 1, 2026
Merged

fewensa merged 1 commit into
mainfrom
codeon/fewensa/FWN-4/a6-eca2f518728e4cfeb1c872994c4e836c

Conversation

@fewensa

@fewensa fewensa commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Reject HTAB and Unicode whitespace anywhere in proxy CONNECT response status lines with a CONNECT-local validation guard, while preserving ASCII space separators and leaving shared HTTP/1 parsing unchanged.

Added sync and async regression coverage for HTAB, NBSP, and EM SPACE in reason phrases; these are now rejected alongside non-SP status-line separators.

Tests:

  • cargo fmt --all -- --check
  • cargo test -p rttp_client test_parse_proxy_connect_response_ -- --nocapture
  • cargo test -p rttp_client --features async async_read_proxy_connect_response_rejects_non_sp -- --nocapture
  • cargo test -p rttp_client --features async async_read_proxy_connect_response_accepts_ascii_sp -- --nocapture
  • git diff --quiet -- crates/rttp-protocol/src/http1.rs

Closes #1164

codeon:
  version: 1
  authority: FWN-4
  description: |-
    Reject HTAB and Unicode whitespace anywhere in proxy CONNECT response status lines while preserving ASCII-space separators. Move sync and async regression cases for non-SP reason-phrase whitespace into rejection coverage.
    
    Tests:
    - cargo fmt --all -- --check
    - cargo test -p rttp_client test_parse_proxy_connect_response_ -- --nocapture
    - cargo test -p rttp_client --features async async_read_proxy_connect_response_rejects_non_sp -- --nocapture
    - cargo test -p rttp_client --features async async_read_proxy_connect_response_accepts_ascii_sp -- --nocapture
    - git diff --quiet -- crates/rttp-protocol/src/http1.rs
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@fewensa
fewensa merged commit aa740de into main Oct 1, 2026
19 checks passed
@fewensa
fewensa deleted the codeon/fewensa/FWN-4/a6-eca2f518728e4cfeb1c872994c4e836c branch October 1, 2026 04:26
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.

Reject non-SP whitespace in proxy CONNECT response status lines

1 participant