]> granicus.if.org Git - php/commitdiff
Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits)
authorIlia Alshanetsky <iliaa@php.net>
Thu, 25 Nov 2010 21:38:06 +0000 (21:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 25 Nov 2010 21:38:06 +0000 (21:38 +0000)
NEWS
ext/iconv/tests/bug53304.phpt [new file with mode: 0644]
ext/standard/quot_print.c

diff --git a/NEWS b/NEWS
index 3aaa9a7d47d37d2e57452d0904b34e3779ddb66f..da02f609c8528a278afbbf79ede801bdab126386 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 #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 
     decimal places). (Ilia)
   . Fixed bug #46587 (mt_rand() does not check that max is greater than min).
diff --git a/ext/iconv/tests/bug53304.phpt b/ext/iconv/tests/bug53304.phpt
new file mode 100644 (file)
index 0000000..7eb6c41
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+Bug #53304 (quot_print_decode does not handle lower-case hex digits)
+--SKIPIF--
+<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
+--FILE--
+<?php
+echo iconv_mime_decode('=?utf-8?Q?Nachricht_=c3=bcber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
+echo iconv_mime_decode('=?utf-8?Q?Nachricht_=C3=BCber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
+
+?>
+--EXPECT--
+Nachricht über Kontaktformular www.inexio.net
+Nachricht über Kontaktformular www.inexio.net
index 0bee54fdbb1eeae280da45bafc484d1f9390132b..030e9178ae84fac8fed47b0c5d05f1a3f164a75d 100644 (file)
@@ -68,7 +68,7 @@ PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t len
                 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 64, 64, 64, 64, 64, 64,
                64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-               64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+               64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,