-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Bug report
Bug description:
If you run
>>> import base64
>>> base64.b64decode("/+/+")
it gives
b'\xff\xef\xfe'
This is expected.
If you run
>>> base64.b64decode("_-_-", altchars="-_")
It gives the same output.
This is expected.
However, if you run
>>> base64.b64decode("/+/+", altchars="-_")
It also gives the same output.
This is not expected.
This is concerning because I'm trying to use file safe base64 (urlsafe_b64decode/encode do not have validate arg, which I need). I can work around this by also checking for / and + as well.
CPython versions tested on:
3.9, 3.11
Operating systems tested on:
Linux, Other
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Todo