GNU bug report logs - #66265
Make padding optional with base64

Previous Next

Package: coreutils;

Reported by: Paul Millar <paul.millar <at> desy.de>

Date: Fri, 29 Sep 2023 13:14:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Millar <paul.millar <at> desy.de>
To: 66265 <at> debbugs.gnu.org
Subject: bug#66265: Make padding optional with base64
Date: Fri, 29 Sep 2023 11:46:18 +0200
Hi,

RFC 4648 says[1]:
>   In some circumstances, the use of padding ("=") in base-encoded data
>   is not required or used.

Currently, the 'base64' application always includes the padding when 
encoding, and prints an warning/error message (on stderr) if padding is 
omitted when decoding.  Decoding is nonetheless successful (the correct 
data is emitted on stdout) if the base64-encoded data omits the padding.

I think the base64 application should be updated to support 
base64-encoded data without padding.

My suggestion would be to add an option to base64 to control whether 
padding is added when encoding.  For decoding, it might make sense to 
add an option to control whether padding is expected.

(although, other approaches might be possible)

Cheers,
Paul.

[1] https://datatracker.ietf.org/doc/html/rfc4648#section-3.2




This bug report was last modified 1 year and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.