GNU bug report logs - #38299
A bug while trying to decode a non encode base64

Previous Next

Package: coreutils;

Reported by: vardhaman narasagoudar <vardhamanbn <at> gmail.com>

Date: Wed, 20 Nov 2019 13:25:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 38299 <at> debbugs.gnu.org (full text, mbox):

From: vardhaman narasagoudar <vardhamanbn <at> gmail.com>
To: 38299 <at> debbugs.gnu.org
Cc: vijay.chaos <at> gmail.com, Martin Schulte <gnu <at> schrader-schulte.de>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#38299: A bug while trying to decode a non encode base64
Date: Thu, 21 Nov 2019 12:04:11 +0530
[Message part 1 (text/plain, inline)]
Hi Team,

Thanks for replying the query, but if I check online (
https://www.base64decode.org/) for decoding  the same in online .

I get  an error  message (which is valid) e.g:-

1) if I try to decode "777799"  I get an error message

"No printable characters found, try another source charset, or upload your
data as a file for binary decoding."

Similarly we got return code as 1 "invalid input" in the terminal.

2) Now if I try to decode "vardhamanbn1" I get the error message  (any 12
characters or multiple of 12 characters which is a non-encoded value, if
try to decode)
"No printable characters found, try another source charset, or upload your
data as a file for binary decoding."

But when we try the same in terminal , we get the return code as 0 the
symbol as per inputs given
 "UTF-8 and thus leads to �."

Now as a work around we are using
a) [vardhaman <at> oc6085028360 ~]$ echo -n "vardhamanbn1" | base64 -d | iconv
-f utf8
iconv: illegal input sequence at position 0

also we tried on another sample

b) [vardhaman <at> oc6085028360 ~]$ echo  -n '777799' | base64 -d | iconv -f utf8
base64: invalid input
iconv: illegal input sequence at position 0

without using "iconv -f utf8"

[vardhaman <at> oc6085028360 ~]$  echo  -n '777799' | base64 -d
����base64: invalid input


So we feel its something still with 12 & multiple of 12 characters leading
to the issue, when we try to decode a non-decode value.
Or should we think characters of multiple of 12 will be treated as a base64
format

 e.g when I tried decoding 24 non-encode character:-
 [vardhaman <at> oc6085028360 ~]$ echo -n 'vardhamanbn1vardhamanbn1' | base64
--decode
��݅�������݅�����[vardhaman <at> oc6085028360 ~]$ echo $?
0



On Thu, Nov 21, 2019 at 12:51 AM Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 11/20/19 6:22 AM, Martin Schulte wrote:
> > vardhamanbn1 is a valid encoding
>
> Thanks for explaining; closing the bug report.
>


-- 
Thanks & Regards
Vardhaman B.N
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 241 days ago.

Previous Next


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