Bug #71746 [NEW]: UTF-8 codepoint escape sequences allow arbitrary number of leading zeros

From: Date: Tue, 08 Mar 2016 15:43:41 +0000
Subject: Bug #71746 [NEW]: UTF-8 codepoint escape sequences allow arbitrary number of leading zeros
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199672@lists.php.net to get a copy of this message
From: temp at temp dot ru Operating system: PHP version: 7.0.4 Package: *Compile Issues Bug Type: Bug Bug description:UTF-8 codepoint escape sequences allow arbitrary number of leading zeros Description: ------------ PHP documentation specifies the following format of UTF-8 codepoint escape sequences: \u{[0-9a-f]{1,6}} However, it's currently possible to use them like this: <?php echo "\u{0000000000000000000000000000000000000000000000000041}"; //Works Moreover, it's currently possible to use capital hexadecimal letters despite documentation says, that only lower-case letters are allowed: <?php echo "\u{AA}"; //Works I'm not sure if these are documentation or compiler bugs. -- Edit bug report at https://bugs.php.net/bug.php?id=71746&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71746&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71746&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71746&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71746&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71746&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71746&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71746&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71746&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71746&r=support Expected behavior: https://bugs.php.net/fix.php?id=71746&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71746&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71746&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71746&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71746&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71746&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71746&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71746&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71746&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71746&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71746&r=mysqlcfg

« previous php.bugs (#199672) next »