zendframework/zend-validator

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

Opened this issue · 1 comments

ac-dc commented

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

This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at laminas/laminas-validator#8.