This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients amaury.forgeotdarc, barry, ctheune, guettli, iritkatriel, pconnell, r.david.murray
Date 2021-12-13.23:49:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639439395.38.0.897377329324.issue12489@roundup.psfhosted.org>
In-reply-to
Content
Reproduced on 3.11:

>>> from email.header import decode_header
>>> decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=')
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/Lib/email/header.py", line 126, in decode_header
    word = email.base64mime.decode(encoded_string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/iritkatriel/src/cpython-1/Lib/email/base64mime.py", line 112, in decode
    return a2b_base64(string.encode('raw-unicode-escape'))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
binascii.Error: Invalid base64-encoded string: number of data characters (49) cannot be 1 more than a multiple of 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/iritkatriel/src/cpython-1/Lib/email/header.py", line 128, in decode_header
    raise HeaderParseError('Base64 decoding error')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
email.errors.HeaderParseError: Base64 decoding error
History
Date User Action Args
2021-12-13 23:49:55iritkatrielsetrecipients: + iritkatriel, barry, guettli, amaury.forgeotdarc, ctheune, r.david.murray, pconnell
2021-12-13 23:49:55iritkatrielsetmessageid: <1639439395.38.0.897377329324.issue12489@roundup.psfhosted.org>
2021-12-13 23:49:55iritkatriellinkissue12489 messages
2021-12-13 23:49:55iritkatrielcreate