[New-bugs-announce] [issue34832] "Short circuiting" in base64's b64decode, decode, decodebytes
Michael Harris
report at bugs.python.org
Fri Sep 28 08:20:13 EDT 2018
New submission from Michael Harris <pw.michael.harris at gmail.com>:
When given an invalid base64 string that starts with a valid base64 substring, the functions will return the decoded bytes only up to the substring rather then ignoring the non-alphabet character.
Examples:
>>> base64.b64decode("AAAAAAAA")
b'\x00\x00\x00\x00\x00\x00'
>>> base64.b64decode("AA=AAAAAA")
b'\x00\x00\x00\x00\x00\x00'
>>> base64.b64decode("AAA=AAAAA")
b'\x00\x00'
----------
components: Library (Lib)
messages: 326630
nosy: pw.michael.harris
priority: normal
severity: normal
status: open
title: "Short circuiting" in base64's b64decode, decode, decodebytes
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34832>
_______________________________________
More information about the New-bugs-announce
mailing list