-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Make Base64 decoding strict by default #148204
Copy link
Copy link
Open
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Earlier specifications of Base64 encoding (e.g. RFC 1421, RFC 2045) allowed to ignore any non-alphabetical characters, and that was the behavior of the base64 module. The later specifications (RFC 3548, RFC 4648) require that non-alphabetic characters should be errors, unless opposite is explicitly specified. The Base64 decoder in Python got the option to enable more strict behavior, and now it got option to specify what exactly characters can be ignored.
I think that we should make Base64 decoding strict by default. I am not sure when we should do this, in 3.15 or in future versions. There is no reasonable way to use warnings, they would do more harm.
cc @gpshead
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement