GNU bug report logs -
#37992
Base64 decode should ignore CRLF
Previous Next
To reply to this bug, email your comments to 37992 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#37992
; Package
coreutils
.
(Wed, 30 Oct 2019 14:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Steven Hilton <malvidin <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 30 Oct 2019 14:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I believe that the base64 implementation in coreutils should ignore
carriage return and line feed line endings (CR, LF, CRLF). Currently, it
only ignores LF line endings.
The -i/--ignore-garbage flag is effective, but should not fail on common
line endings.
$ echo -ne
"R05VIEJhc2U2NCBkZWNvZGUgc2hvdWxkIGlnbm9yZSBib3RoIENSIGFuZC9vciBMRg0K\r\nR05VIEJhc2U2NCBkZWNvZGUgc2hvdWxkIGlnbm9yZSBib3RoIENSIGFuZC9vciBMRg0K"
| base64 -d
Current Output:
GNU Base64 decode should ignore both CR and/or LF
base64: invalid input
Expected Output:
GNU Base64 decode should ignore both CR and/or LF
GNU Base64 decode should ignore both CR and/or LF
Per the Base64 RFC, section 3.3,
Note that this means that any adjacent carriage return/line feed
(CRLF) characters constitute "non-alphabet characters" and are
ignored.
https://tools.ietf.org/html/rfc4648#section-3.3
<https://www.google.com/url?q=https://tools.ietf.org/html/rfc4648%23section-3.3&sa=D&source=hangouts&ust=1572513581650000&usg=AFQjCNGmIlJSlyucb75tnWNUbAovfdasIg>
My interpretation of this section is that the base64 decoding should either
fail on any non-Alphabet character, or should ignore any line ending
combination.
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.