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 serhiy.storchaka
Recipients serhiy.storchaka
Date 2019-12-15.17:21:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If validate=True is passed to base64.b64decode(), it should raise a binascii.Error if the input contains any character not from the acceptable alphabet.

But it does not raise if the input ends with a single \n. It raises if the input ends with a multiple \n or with any other whitespace character. Only a single \n is accepted.

This is an implementation artifact. A regular exception ending with $ is used to validate an input. But $ matches not only end of string. It matches also an empty string before the trailing \n.

Similar errors are also occurred in other sites. I'll open separate issues for different cases.
Date User Action Args
2019-12-15 17:21:28serhiy.storchakasetrecipients: + serhiy.storchaka
2019-12-15 17:21:28serhiy.storchakasetmessageid: <>
2019-12-15 17:21:28serhiy.storchakalinkissue39055 messages
2019-12-15 17:21:28serhiy.storchakacreate