From:             jgoldsmith at returnpath dot net
Operating system: FC4
PHP version:      5.1.2
PHP Bug Type:     ICONV related
Bug description:  iconv_mime_decode case-sensitivity for encoding token ('B' or 
'Q')

Description:
------------
iconv_mime_decode doesn't recognize lower-case encoding tokens  ('b' or
'q'). These are acceptible according to the MIME RFC
(http://www.ietf.org/rfc/rfc2047.txt).

Here is a fix. Edit file: /ext/iconv/iconv.c

Line: 1398
Change
case 'B':
to
case 'B': case 'b':

Line 1403
Change
case 'Q':
to
case 'Q': case 'q':

Reproduce code:
---------------
$string = '=?UTF-8?b?VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZyE=?=';
echo iconv_mime_decode($string,1);

Expected result:
----------------
This is an encoded string!

Actual result:
--------------
Warning: iconv_mime_decode() [function.iconv-mime-decode]: Malformed
string

-- 
Edit bug report at http://bugs.php.net/?id=36806&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36806&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36806&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36806&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36806&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36806&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36806&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36806&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36806&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36806&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36806&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36806&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36806&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36806&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36806&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36806&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36806&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36806&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36806&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36806&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36806&r=mysqlcfg

Reply via email to