]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #34214 (base64_decode() does not properly ignore whitespace)
authorIlia Alshanetsky <iliaa@php.net>
Fri, 26 Aug 2005 03:33:07 +0000 (03:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 26 Aug 2005 03:33:07 +0000 (03:33 +0000)
ext/standard/base64.c

index 760ec7842f8db872b15d334a9e5492a186ba62e6..8a7fc4bce5fffd6ad24d98f7144c952391fbefa0 100644 (file)
@@ -153,15 +153,6 @@ PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, in
        while ((ch = *current++) != '\0' && length-- > 0) {
                if (ch == base64_pad) break;
 
-           /* When Base64 gets POSTed, all pluses are interpreted as spaces.
-                  This line changes them back.  It's not exactly the Base64 spec,
-                  but it is completely compatible with it (the spec says that
-                  spaces are invalid).  This will also save many people considerable
-                  headache.  - Turadg Aleahmad <turadg@wise.berkeley.edu>
-           */
-
-               if (ch == ' ') ch = '+'; 
-
                ch = base64_reverse_table[ch];
                if (ch < 0) continue;