ID:               37244
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Assigned
+Status:           Closed
 Bug Type:         URL related
 Operating System: Irrelevant
 PHP Version:      5CVS-2006-04-29 (CVS)
 Assigned To:      iliaa
 New Comment:

This bug has been fixed in CVS.

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:
------------------------------------------------------------------------

[2006-04-29 13:58:29] [EMAIL PROTECTED]

Description:
------------
base64_decode violates RFC 3548:

"Implementations MUST reject the encoding if it contains characters
outside the base alphabet when interpreting base encoded data, unless
the specification referring to this document explicitly states
otherwise."

Reproduce code:
---------------
<?php
$strings = array(
                
'SW1wbGVtZW50YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
                
'SW1wbGVtZW$0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
                
'SW1wbGVtZW0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu'
                 );
foreach($strings as $string) {
  var_dump(base64_decode($string));
}
?>

Expected result:
----------------
string(93) "Implementations MUST reject the encoding if it contains
characters outside the base alphabet."
bool(false)
string(92) "Implemem][ÛÈUTZXH[ÛÙ[ÈYÛÛZ[ÈÚ\XÝ\ÈÝ]ÚYHH\ÙH[X]"





Actual result:
--------------
string(93) "Implementations MUST reject the encoding if it contains
characters outside the base alphabet."
string(92) "Implemem][ÛÈUTZXH[ÛÙ[ÈYÛÛZ[ÈÚ\XÝ\ÈÝ]ÚYHH\ÙH[X]"
string(92) "Implemem][ÛÈUTZXH[ÛÙ[ÈYÛÛZ[ÈÚ\XÝ\ÈÝ]ÚYHH\ÙH[X]"







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


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

Reply via email to