Skip to content

[codex] Validate SOCKS5 auth field lengths#37

Merged
madeye merged 1 commit into
mainfrom
codex/validate-socks5-auth-lengths
Jun 14, 2026
Merged

[codex] Validate SOCKS5 auth field lengths#37
madeye merged 1 commit into
mainfrom
codex/validate-socks5-auth-lengths

Conversation

@madeye

@madeye madeye commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • reject empty SOCKS5 username/password fields during upstream proxy parsing
  • reject credentials longer than the one-byte RFC 1929 length fields can encode
  • build SOCKS5 auth frames through a checked helper so programmatic auth cannot truncate lengths

Tests

  • cargo fmt --all -- --check
  • cargo test upstream_proxy_rejects
  • cargo test socks5_auth_request
  • cargo test test_upstream_proxy_parse_socks5_auth
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • git diff --check

@madeye madeye marked this pull request as ready for review June 14, 2026 03:27
@madeye madeye force-pushed the codex/validate-socks5-auth-lengths branch from 21bc3cd to 50f07bf Compare June 14, 2026 03:36
@madeye madeye merged commit 25fc8b7 into main Jun 14, 2026
@madeye madeye deleted the codex/validate-socks5-auth-lengths branch June 14, 2026 03:40
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.

1 participant