]> git.ipfire.org Git - thirdparty/tornado.git/commit
httputil: Reject header lines beginning with invalid whitespace 3488/head
authorBen Darnell <ben@bendarnell.com>
Fri, 25 Apr 2025 19:31:13 +0000 (15:31 -0400)
committerBen Darnell <ben@bendarnell.com>
Fri, 25 Apr 2025 19:40:08 +0000 (15:40 -0400)
commit1ea1435f89796e115351ba3b25715bc63a0ed00e
tree9b083fb5b58cde42be5408cf4f920498fab26204
parent1a8c15283af6bfc5b5944a3f2c6df4ff067e56a7
httputil: Reject header lines beginning with invalid whitespace

The obs-fold feature is defined only for tabs and spaces.
The str.isspace() method also accepts other whitespace characters.
These characters are not valid in HTTP headers and should be treated
as errors instead of triggering line folding.

Fixes #3480
tornado/httputil.py
tornado/test/httputil_test.py