mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Refs #33697 -- Fixed multipart parsing of headers with double quotes and semicolons.
See1ef0c0349eBackport of93cedc82f2from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
962d594742
commit
2f974e3c1e
@@ -748,7 +748,7 @@ def _parse_header_params(s):
|
||||
while s[:1] == b";":
|
||||
s = s[1:]
|
||||
end = s.find(b";")
|
||||
while end > 0 and s.count(b'"', 0, end) % 2:
|
||||
while end > 0 and (s.count(b'"', 0, end) - s.count(b'\\"', 0, end)) % 2:
|
||||
end = s.find(b";", end + 1)
|
||||
if end < 0:
|
||||
end = len(s)
|
||||
|
||||
Reference in New Issue
Block a user