]> git.kaiwu.me - haproxy.git/commit
REGTESTS: tcp-rules: test the RDP cookie fetches
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 19:50:44 +0000 (19:50 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
commit2e0c6708ec6ceb809b4347b2a39689eab45ca1f0
treee4b64b49098971d212e4421db3cc91dd4e31a499
parent4e25df570d08a41f149d0a118ca319bb91afebff
REGTESTS: tcp-rules: test the RDP cookie fetches

req.rdp_cookie, req.rdp_cookie_cnt, their deprecated rdp_cookie and
rdp_cookie_cnt spellings and the req_rdp_cookie/req_rdp_cookie_cnt ACL
forms had no coverage. The notes listed the test as doable, the only
obstacle being that the RDP connection request has to be built by hand,
which sendhex does here: the parser only skips the 11 bytes of the TPKT
and X.224 headers and looks for a "Cookie:" line behind them, without
checking any of the lengths.

Four packets are sent to a TCP frontend which reports the fetches in
its log: one carrying "mstshash=hello", one whose line is not a cookie,
one carrying another cookie name, which only the unnamed form returns,
and one with extra spaces between the colon and the name.
reg-tests/tcp-rules/rdp_cookie.vtc [new file with mode: 0644]