Bug #71019 [NEW]: preg_match length

From: Date: Thu, 03 Dec 2015 20:23:01 +0000
Subject: Bug #71019 [NEW]: preg_match length
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197572@lists.php.net to get a copy of this message
From: nospam4me at diamantnetz dot de Operating system: Linux Ubuntu PHP version: 5.6.16 Package: Scripting Engine problem Bug Type: Bug Bug description:preg_match length Description: ------------ 1. input one or more of the german äÄöÖüÜß in a html form 30 times (= max length) 2. Submit $_POST['passwort'] 3. You get an error ("Fehler") The same with i.E. 30 digits or a-Z doesnt produce an error. An input of german äÄöÖüÜß less then 30 times doesnt produce an error. A really not so nice fault ;-) Perhaps the fault is corresponding with utf-8 Test script: --------------- header("Content-Type: text/html; charset=utf-8"); if( (!@(preg_match('/^[0-9a-zA-ZäÄöÖüÜß&?!%@#,\.:_=+-]{1,30}$/',$_POST['passwort']))) ) echo 'Fehler'; -- Edit bug report at https://bugs.php.net/bug.php?id=71019&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71019&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71019&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71019&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71019&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71019&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71019&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71019&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71019&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71019&r=support Expected behavior: https://bugs.php.net/fix.php?id=71019&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71019&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71019&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71019&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71019&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71019&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71019&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71019&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71019&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71019&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71019&r=mysqlcfg

« previous php.bugs (#197572) next »