Files
rsync/testsuite/proxy-connect-request-too-long_test.py
Andrew Tridgell ae014a56f3 testsuite: daemon auth / access / proxy / config hardening
auth-digest floor, namecvt empty/newline, proxy-protocol (CRLF, trusted-peer,
over-long lines), connect-prog/exec/remote-shell quoting, unix-socket atfd, and the
daemon scan cwd/dir-escape tests.
2026-07-20 14:05:31 +10:00

11 lines
435 B
Python

#!/usr/bin/env python3
from rsyncfns import claim_ports, require_tcp
from rsyncfns import make_proxy_server, run_proxy_probe
PORT = 12931
require_tcp("fake-proxy listener needs a real TCP socket; run with --use-tcp")
claim_ports(PORT)
make_proxy_server(PORT, b"")
run_proxy_probe(PORT, 'a' * 1500 + '.invalid', 'proxy CONNECT request too long')
print("proxy-connect-request-too-long: oversized CONNECT request rejected before write")