From 316d5a19a629488a64d623de14b323d1165755a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lauri=20Kentt=C3=A4?= Date: Mon, 11 Jul 2016 12:40:10 +0300 Subject: [PATCH] base64_decode: Handle all invalid padding equally --- ext/standard/base64.c | 5 ----- 1 file changed, 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; } -- 2.40.0