com php-src: base64_decode: Handle all invalid padding equally: ext/standard/base64.c

From: Date: Fri, 22 Jul 2016 16:03:56 +0000
Subject: com php-src: base64_decode: Handle all invalid padding equally: ext/standard/base64.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93321@lists.php.net to get a copy of this message
Commit: 316d5a19a629488a64d623de14b323d1165755a2 Author: Lauri Kenttä <lauri.kentta@gmail.com> Mon, 11 Jul 2016 12:40:10 +0300 Committer: Nikita Popov <nikic@php.net> Fri, 22 Jul 2016 18:03:56 +0200 Parents: 5c62f3f68e38dd12a8e2f590f5f52d11d0aad8a6 Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=316d5a19a629488a64d623de14b323d1165755a2 Log: base64_decode: Handle all invalid padding equally Changed paths: M ext/standard/base64.c Diff: diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 374628d..87cc1e8 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -149,11 +149,6 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length break; } if (ch == base64_pad) { - /* fail if the padding character is second in a group (like V===) */ - /* FIXME: why do we still allow invalid padding in other places in the middle of the string? */ - if (i % 4 == 1) { - goto fail; - } padding++; continue; }

« previous php.cvs (#93321) next »