]> git.kaiwu.me - haproxy.git/commit
MINOR: http/hardening: implement hardening "reject-content-length-leading-zero"
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 15:15:02 +0000 (16:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commit97bc177f9f3051028913e169f747395dbcf93af9
tree96b5a5e238e4e6ffc398574708f2679646c0c2b4
parent3bd127283f9f302bf63d9e8723da62a97b269734
MINOR: http/hardening: implement hardening "reject-content-length-leading-zero"

Rejects requests and responses having a Content-Length header field
whose value contains a leading zero before a digit. Some client and
server applications tend to parse this as an octal value giving a
different body size (e.g. "0300" = 192). This can be used in attacks
trying to desynchronize a client or server from the rest of the
communication, and for example for cache poisionning attacks. These may
seldom be seen on legacy applications but not on standard compoennts
found on the internet, so it is generally safe to reject them on public
facing listeners.
doc/configuration.txt
include/haproxy/http-t.h
src/http.c