Bug #71019 [Opn->Nab]: preg_match length
| From: | requinix@php.net | Date: | Thu, 03 Dec 2015 22:40:20 +0000 |
| Subject: | Bug #71019 [Opn->Nab]: preg_match length | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197573@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71019&edit=1
ID: 71019
Updated by: requinix@php.net
Reported by: nospam4me at diamantnetz dot de
Summary: preg_match length
-Status: Open
+Status: Not a bug
Type: Bug
-Package: Scripting Engine problem
+Package: PCRE related
Operating System: Linux Ubuntu
PHP Version: 5.6.16
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You must use the /u flag in your regex if you want UTF-8 support.
http://php.net/manual/en/reference.pcre.pattern.modifiers.php
Previous Comments:
------------------------------------------------------------------------
[2015-12-03 20:22:58] nospam4me at diamantnetz dot de
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 this bug report at https://bugs.php.net/bug.php?id=71019&edit=1