Edit report at http://bugs.php.net/bug.php?id=53304&edit=1

 ID:                 53304
 Updated by:         il...@php.net
 Reported by:        daniel dot mueller at inexio dot net
 Summary:            iconv_mime_docode() doesn't handle lowercase hex
                     digits
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            ICONV related
 Operating System:   all
 PHP Version:        5.3SVN-2010-11-13 (snap)
-Assigned To:        aharvey
+Assigned To:        iliaa
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-11-25 22:38:08] il...@php.net

Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=305759
Log: Fixed bug #53304 (quot_print_decode does not handle lower-case hex
digits)

------------------------------------------------------------------------
[2010-11-17 19:36:04] daniel dot mueller at inexio dot net

I have attached a fix for this problem.



The patch changes php_quot_print_decode() in ext/standard/quot_print.c
so,

that it accepts the lowercase hex digits a-f.



This function seems currently only used for mime header decoding
according 

rfc2047 in ext/iconv/iconv.c



However rfc2045 defines lowercase characters as illegal, but allows to
recognize 

them as the corresponding uppercase letters in decoding.

------------------------------------------------------------------------
[2010-11-13 10:31:56] daniel dot mueller at inexio dot net

Description:
------------
iconv_mime_docode() doesn't handle lowercase hex digits in Q-encoding.



According rfc2047 hex digits should be in uppercase, but it must not be
in this way.



Example:

=c3=bc - gives error

=C3=BC - works





Test script:
---------------
<?php

error_reporting(E_ALL);

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";

?>



Expected result:
----------------
Nachricht über Kontaktformular www.inexio.net

Nachricht über Kontaktformular www.inexio.net

Actual result:
--------------
Notice: iconv_mime_decode(): Unknown error (25) in /usr/home/dm/test.php
on line 3



Nachricht über Kontaktformular www.inexio.net




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53304&edit=1

Reply via email to