Hi,
I have run in to a problem when trying to base64 decode a file that contains garbage data. This is with the coreutils version 0.8.0, installed from the Ubuntu 26.04 Resolute apt repository.
Consider the following truncated content from my_base64_file.txt:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMjQ5MmF
Yes! It contains a ., which is garbage. I know.
When decoding it with base64 (GNU coreutils) 9.4 the result is:
base64 -d my_base64_file.txt --> {"alg":"RS256","typ":"JWT"}base64: invalid input
base64 -di my_base64_file.txt --> {"alg":"RS256","typ":"JWT"}{"jti":"c2492abase64: invalid input
But, with base64 (core uutils 0.8.0) I get:
base64 -d my_base64_file.txt --> base64: error: invalid input
base64 -di my_base64_file.txt --> base64: error: invalid input
Is there something I am missing here, or is there a bug with the --ignore-garbage feature?
Hi,
I have run in to a problem when trying to base64 decode a file that contains garbage data. This is with the coreutils version 0.8.0, installed from the Ubuntu 26.04 Resolute apt repository.
Consider the following truncated content from
my_base64_file.txt:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMjQ5MmFYes! It contains a
., which is garbage. I know.When decoding it with
base64 (GNU coreutils) 9.4the result is:base64 -d my_base64_file.txt-->{"alg":"RS256","typ":"JWT"}base64: invalid inputbase64 -di my_base64_file.txt-->{"alg":"RS256","typ":"JWT"}{"jti":"c2492abase64: invalid inputBut, with
base64 (core uutils 0.8.0)I get:base64 -d my_base64_file.txt-->base64: error: invalid inputbase64 -di my_base64_file.txt-->base64: error: invalid inputIs there something I am missing here, or is there a bug with the
--ignore-garbagefeature?