zendframework / zend-validator

Validator component from Zend Framework
BSD 3-Clause "New" or "Revised" License
181 stars 136 forks source link

preg_match(): Compilation failed: regular expression is too large at offset 156184 #219

Open ac-dc opened 6 years ago

ac-dc commented 6 years ago

This happens while using Zend\Validator\Hostname->isValid('tapi4457@hsoqvf.biz') because hostname/Biz.php contains enormous regular expression

Trace looks like this:

preg_match('/^[\x{002d}0-9a-z\x{3447}\x{3473}\x{359..(156088 chars skipped)..9FA0}\x{9FA2}\x{9FA4}\x{9FA5}]{1,20}$/iu','tapi4457@hsoqvf') /vendor/zendframework/zend-validator/src/Hostname.php:1877

PHP Version 7.1.7

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at https://github.com/laminas/laminas-validator/issues/8.