mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
Prevent 'f-string expression part cannot include a backslash'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1938417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -107,8 +107,10 @@ class TestStatusLineCR:
|
||||
f"bare CR in status line: {status_line!r}"
|
||||
assert b"X-Foobar" not in status_line, \
|
||||
f"attacker text in status line: {status_line!r}"
|
||||
# Prevent 'f-string expression part cannot include a backslash'
|
||||
hide_backslash = b'\\r\\n\\r\\n'
|
||||
assert b"X-Foobar" not in raw.split(b"\r\n\r\n")[0], \
|
||||
f"injected header in response headers: {raw.split(b'\\r\\n\\r\\n')[0]!r}"
|
||||
f"injected header in response headers: {raw.split(hide_backslash)[0]!r}"
|
||||
|
||||
env.httpd_error_log.ignore_recent(
|
||||
lognos=["AH00957", "AH01106", "AH01114"]
|
||||
|
||||
Reference in New Issue
Block a user