From f073fb621d96ece90a0214b510afd827eac66fe5 Mon Sep 17 00:00:00 2001 From: Anonymous Contributor Date: Wed, 23 Aug 2023 18:16:35 +0200 Subject: [PATCH] Add validation regex for new identity's name --- pages/identities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/identities.php b/pages/identities.php index 6c6fe88..8df562e 100644 --- a/pages/identities.php +++ b/pages/identities.php @@ -57,7 +57,7 @@ } else if(isset($_POST['createIdent'])) { $validator = new FormValidator(array( - 'newName' => array('required' => true, 'regex' => '') + 'newName' => array('required' => true, 'regex' => '/[^\\/<>\s]{1,64} [^\\/<>\s]{1,64}/') )); if($validator->isValid($_POST)) {