Changes between Version 2 and Version 3 of Ticket #23397
- Timestamp:
- Sep 2, 2014, 12:33:21 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23397
- Property Has patch set
-
Ticket #23397 – Description
v2 v3 3 3 parse() tries to process base64 encoded files in chunks with lengths a multiple of 4. The base64 encoded string can contain newline characters, which aren't significant in base64 and should be ignored, but are counted toward's a chunk's length in parse(). This means when whitespace is stripped from the string, the count of base64 encoded characters may not be a multiple of 4, leading to an "Incorrect padding" error. 4 4 5 Here's a testcase for creating this failure: 5 This pull request has a testcase for producing the failure and a proposed patch to fix the issue. 6 6 7 https://github.com/ jhobbs/django/commit/98347e396133990b82b596310e4490369ba676d57 https://github.com/django/django/pull/3151/files 8 8 9 9 Stacktrace: