mirror of
https://github.com/php/php-src.git
synced 2024-10-21 08:22:42 +00:00
19 lines
801 B
PHP
19 lines
801 B
PHP
--TEST--
|
||
Bug #37244 (base64_decode violates RFC 3548)
|
||
--FILE--
|
||
<?php
|
||
$strings = array(
|
||
'SW1wbGVtZW50YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
|
||
'SW1wbGVtZW$0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
|
||
'SW1wbGVtZW0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu'
|
||
);
|
||
foreach($strings as $string) {
|
||
var_dump(base64_decode($string, true));
|
||
}
|
||
?>
|
||
--EXPECT--
|
||
string(93) "Implementations MUST reject the encoding if it contains characters outside the base alphabet."
|
||
bool(false)
|
||
string(92) "Implemem][ÛœÈUTÕ™Z™XÝH[˜ÛÙ[™ÈYˆ]ÛÛ<C39B>Z[œÈÚ\˜XÝ\œÈÝ]ÚYHH˜\ÙH[X™]"
|
||
|