mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
base64_decode: Handle all invalid padding equally
This commit is contained in:
parent
5c62f3f68e
commit
316d5a19a6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user