Annotation of embedaddon/php/ext/standard/tests/strings/bug37244.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #37244 (base64_decode violates RFC 3548)
        !             3: --FILE--
        !             4: <?php
        !             5: $strings = array(
        !             6:     'SW1wbGVtZW50YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
        !             7:     'SW1wbGVtZW$0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu',
        !             8:     'SW1wbGVtZW0YXRpb25zIE1VU1QgcmVqZWN0IHRoZSBlbmNvZGluZyBpZiBpdCBjb250YWlucyBjaGFyYWN0ZXJzIG91dHNpZGUgdGhlIGJhc2UgYWxwaGFiZXQu'
        !             9: );
        !            10: foreach($strings as $string) {
        !            11:     var_dump(base64_decode($string, true));
        !            12: }
        !            13: ?>
        !            14: --EXPECT--
        !            15: string(93) "Implementations MUST reject the encoding if it contains characters outside the base alphabet."
        !            16: bool(false)
        !            17: string(92) "Implemem][ۜUTZXH[[Y]۝Z[\X\]YHH\H[X]"
        !            18: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>