GNU bug report logs - #26372
Base64 inserts carriage return

Previous Next

Package: coreutils;

Reported by: Goulven Guillard <lecotegougdelaforce <at> free.fr>

Date: Wed, 5 Apr 2017 15:27:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Goulven Guillard <lecotegougdelaforce <at> free.fr>, 26372 <at> debbugs.gnu.org
Subject: bug#26372: Base64 inserts newline [was "Base64 inserts carriage return"]
Date: Wed, 5 Apr 2017 11:55:25 -0400
Hello,

On 04/05/2017 07:35 AM, Goulven Guillard wrote:
> I just figured it was not a carriage return ("\r") but a simple newline
> ("\n").  I was misleaded because for some reason my PHP form translates
> "\n" into "\r\n" during the POST submission.

While PHP and HTTP are outside the scope of GNU coreutils,
it's worth noting that the HTTP standard (which include POST
submissions) mandates "\r\n" (CR,LF) as line-endings in forms and in
headers, e.g.:

in HTTP headers:
https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html

In FORMS:
"Line breaks, as in multi-line text field values,
 are represented as CR LF pairs, i.e. `%0D%0A'."
from:  https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1

> Anyway, it doesn't change much the issue.

It doesn't, and the issue is still in "echo", not in "base64" :)

regards,
 - assaf







This bug report was last modified 8 years and 107 days ago.

Previous Next


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