>Number:         152229
>Category:       bin
>Synopsis:       b64decode(1)/b64_pton(3) should decode common variant of base64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 14 06:10:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Wollman
>Release:        FreeBSD 8.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD hergotha.csail.mit.edu 8.1-RELEASE FreeBSD 8.1-RELEASE #0 
r212140M: Sat Sep 4 00:16:21 EDT 2010 
woll...@hergotha.csail.mit.edu:/usr/obj/usr/src/sys/HERGOTHA amd64

>Description:

A friend recently asked me to decode some text he had received, which
was in a mutant version of the base64 encoding.  A quick search led me
to the O'Reilly book /Unicode Explained/, which describes a
"URL/file-system-safe variant" of base64 which uses '-' and '_' in
place of the standard '+' and '/', respectively.  We should not
generate this nonstandard form, but we should accept it, since it is
unambiguous, in accordance with Postel's Robustness Principle.  (The
specific reference is on page 308, found in Google Books for the
search 'base64 with hyphen'.)

>How-To-Repeat:
        
>Fix:

I don't have a suggested fix (I hacked around it to answer the
question at hand but the hack is not suitable for general use).  I'm
not sure if we should require a flag to be set (or a special version
of b64_pton() to be called) to decode this version, or just treat it
as normal base64.
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to