From 87c21a06ebb9542524f5467335696e757328be6d Mon Sep 17 00:00:00 2001 From: Anonymous Contributor Date: Wed, 23 Aug 2023 18:16:35 +0200 Subject: [PATCH] Fix incorrect regex escaping --- pages/login.php | 2 +- pages/register.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/login.php b/pages/login.php index bed6d8d..bbbe681 100644 --- a/pages/login.php +++ b/pages/login.php @@ -7,7 +7,7 @@ { include_once 'app/FormValidator.php'; $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}/') )); diff --git a/pages/register.php b/pages/register.php index af039b0..bf4b3fa 100644 --- a/pages/register.php +++ b/pages/register.php @@ -38,7 +38,7 @@ $validator = new FormValidator(array( '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}/'), 'email' => array('required' => true, 'regex' => '/\S{1,64}@\S{1,250}.\S{2,64}/'), 'avatar' => array('required' => true)