1
0
Fork 0

Fix incorrect regex escaping

master
Anonymous Contributor 2023-08-23 18:16:35 +02:00
parent 0a6b06fb29
commit 87c21a06eb
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{ {
include_once 'app/FormValidator.php'; include_once 'app/FormValidator.php';
$validator = new FormValidator(array( $validator = new FormValidator(array(
'username' => array('required' => true, 'regex' => '/[^\\\/<>\s]{1,64} [^\\\/<>\s]{1,64}/'), 'username' => array('required' => true, 'regex' => '/[^\\/<>\s]{1,64} [^\\/<>\s]{1,64}/'),
'password' => array('required' => true, 'regex' => '/.{1,1000}/') 'password' => array('required' => true, 'regex' => '/.{1,1000}/')
)); ));

View File

@ -38,7 +38,7 @@
$validator = new FormValidator(array( $validator = new FormValidator(array(
'tos' => array('required' => true, 'equals' => 'on'), 'tos' => array('required' => true, 'equals' => 'on'),
'username' => array('required' => true, 'regex' => '/[^\\\/<>\s]{1,64}( [^\\\/<>\s]{1,64})?/'), 'username' => array('required' => true, 'regex' => '/[^\\/<>\s]{1,64}( [^\\/<>\s]{1,64})?/'),
'password' => array('required' => true, 'regex' => '/.{1,1000}/'), 'password' => array('required' => true, 'regex' => '/.{1,1000}/'),
'email' => array('required' => true, 'regex' => '/\S{1,64}@\S{1,250}.\S{2,64}/'), 'email' => array('required' => true, 'regex' => '/\S{1,64}@\S{1,250}.\S{2,64}/'),
'avatar' => array('required' => true) 'avatar' => array('required' => true)