]> granicus.if.org Git - php/commitdiff
Fixed bug #52327 (base64_decode() improper handling of leading padding in strict...
authorIlia Alshanetsky <iliaa@php.net>
Fri, 26 Nov 2010 20:59:13 +0000 (20:59 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 26 Nov 2010 20:59:13 +0000 (20:59 +0000)
NEWS
ext/standard/tests/url/bug52327.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 417508e7a4792250810649f9163f9d1f71f5df76..f880e46c9b436de17979824f1cef29ad742b88d4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@
 - Core:
   . Fixed extract() to do not overwrite $GLOBALS and $this when using
     EXTR_OVERWRITE. (jorto at redhat dot com)
+  . Fixed bug #52327 (base64_decode() improper handling of leading padding in
+    strict mode). (Ilia)
   . Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits).
     (Ilia, daniel dot mueller at inexio dot net)
   . Fixed bug #47168 (printf of floating point variable prints maximum of 40 
diff --git a/ext/standard/tests/url/bug52327.phpt b/ext/standard/tests/url/bug52327.phpt
new file mode 100644 (file)
index 0000000..fb2e0fa
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+Bug #52327 (base64_decode() improper handling of leading padding)
+--FILE--
+<?php
+var_dump(
+       base64_decode('=VGhl=ICc9=JyBz=eW1i=b2xz=IGFy=ZW4n=dCBh=bGxv=d2Vk=IHdo=ZXJl=IGkg=cHV0=IHRo=ZW0g=by5P'),
+       base64_decode('=VGhl=ICc9=JyBz=eW1i=b2xz=IGFy=ZW4n=dCBh=bGxv=d2Vk=IHdo=ZXJl=IGkg=cHV0=IHRo=ZW0g=by5P', true)
+);
+?>
+--EXPECT--
+string(51) "The '=' symbols aren't allowed where i put them o.O"
+bool(false)