summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Kenttä <lauri.kentta@gmail.com>2016-07-11 12:40:10 +0300
committerNikita Popov <nikic@php.net>2016-07-22 18:03:56 +0200
commit316d5a19a629488a64d623de14b323d1165755a2 (patch)
treeeda0f3f3fe6977f8f16d14bc36ac3095294be685
parent5c62f3f68e38dd12a8e2f590f5f52d11d0aad8a6 (diff)
downloadphp-git-316d5a19a629488a64d623de14b323d1165755a2.tar.gz
base64_decode: Handle all invalid padding equally
-rw-r--r--ext/standard/base64.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index 374628d861..87cc1e8639 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;
}