diff options
| author | Mehrdad <mhrddmoradii@gmail.com> | 2022-05-27 13:18:06 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-06-01 10:11:07 +0200 |
| commit | 93cedc82f29076c824d476354527af1150888e4f (patch) | |
| tree | e988ecb3b0a1ce42371ae220d4361b56909314a3 /django/http/multipartparser.py | |
| parent | 295249c901e13ec1703ada5c414cd97aba72f3e9 (diff) | |
Refs #33697 -- Fixed multipart parsing of headers with double quotes and semicolons.
See https://github.com/python/cpython/commit/1ef0c0349e8fdb5415e21231cb42edbf232b742a
Diffstat (limited to 'django/http/multipartparser.py')
| -rw-r--r-- | django/http/multipartparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index 308fbfa385..26fb2bc41f 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -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) |
