Bug 204567 - base64 -d doesn't accept base64 output
base64 -d doesn't accept base64 output
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks: FC7Target
  Show dependency treegraph
 
Reported: 2006-08-29 21:18 EDT by James Antill
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 6.9-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-09 12:05:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simple fix for base64 decoding return's (611 bytes, patch)
2006-08-30 01:03 EDT, James Antill
no flags Details | Diff

  None (edit)
Description James Antill 2006-08-29 21:18:35 EDT
Description of problem:
 base64 -d doesn't accept returns (which the base64 encoding should put every 76
characters and at the end of the encoding).

Version-Release number of selected component (if applicable):
 coreutils-5.97-6

How reproducible:
 Always

Steps to Reproduce:
1. echo x | base64 | base64 -d
2. perl -le 'print "a" x 80' | base64 | base64 -d

Additional info:
 base64 -id does work but (IMNSHO) the output of base64 and what the rfc says
you should do should hardly be clasified as garbage. However this does present
the obvious fix of looking for '\n' (and skipping it) on the else clause of the
ignore_garbage check.
Comment 1 James Antill 2006-08-30 01:03:11 EDT
Created attachment 135184 [details]
Simple fix for base64 decoding return's

 This is a simple fix, although not very efficient and allows some things
through that shouldn't be allowed without -i. On the other hand it's so simple
it's obviously OK to apply.
Comment 2 Jim Meyering 2007-01-07 17:52:20 EST
I've fixed this properly for the next upstream coreutils release:
http://www.nabble.com/base64.c-vs.-newlines-tf2913943.html#a8157334

Note You need to log in before you can comment on or make changes to this bug.