From: Ilia Alshanetsky Date: Fri, 26 Aug 2005 03:32:53 +0000 (+0000) Subject: MFH: Fixed bug #34214 (base64_decode() does not properly ignore whitespace) X-Git-Tag: PRE_NEW_OCI8_EXTENSION~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1e661ce70c9b4516d4b3dccb97017d41eecf6a7;p=php MFH: Fixed bug #34214 (base64_decode() does not properly ignore whitespace) --- diff --git a/ext/standard/base64.c b/ext/standard/base64.c index c9520d415b..7c8ef551d8 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -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 - */ - - if (ch == ' ') ch = '+'; - ch = base64_reverse_table[ch]; if (ch < 0) continue;