mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
MFH: test for bug #37244
This commit is contained in:
parent
3d63ca3edc
commit
c9c2c0e1f8
18
ext/standard/tests/strings/bug37244.phpt
Normal file
18
ext/standard/tests/strings/bug37244.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--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™]"
|
||||
|
Loading…
Reference in New Issue
Block a user