]> granicus.if.org Git - python/commit
bpo-27397: Make email module properly handle invalid-length base64 strings (#7583)
authorTal Einat <taleinat+github@gmail.com>
Tue, 12 Jun 2018 12:46:22 +0000 (15:46 +0300)
committerGitHub <noreply@github.com>
Tue, 12 Jun 2018 12:46:22 +0000 (15:46 +0300)
commitc3f55be7dd012b7e92901627d0b31c21e983ccb4
tree86fb2e7e33615aee453d73f27063a4ec345e89fa
parent5a9820918077a65db90f24733edc8935c3e2130e
bpo-27397: Make email module properly handle invalid-length base64 strings (#7583)

When attempting to base64-decode a payload of invalid length (1 mod 4),
properly recognize and handle it.  The given data will be returned as-is,
i.e. not decoded, along with a new defect, InvalidBase64LengthDefect.
Doc/library/email.errors.rst
Lib/email/_encoded_words.py
Lib/email/errors.py
Lib/test/test_email/test__encoded_words.py
Lib/test/test_email/test__header_value_parser.py
Lib/test/test_email/test_defect_handling.py
Misc/NEWS.d/next/Library/2018-06-10-09-43-54.bpo-27397.0_fFQR.rst [new file with mode: 0644]