From a1b4e36cf4f82c0a6f65b77eeb37d99f98e82fe7 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 2 Sep 2017 13:46:30 +0200 Subject: [PATCH] Simplify regular expression for UUID --- php/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/settings.php b/php/settings.php index f68b24c..f0b42fd 100644 --- a/php/settings.php +++ b/php/settings.php @@ -212,7 +212,7 @@ function parse_llHTTPRequest_headers(){ } function isValidGuid($guid){ - return !empty($guid) && preg_match('/^\{?[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}\}?$/', $guid); + return !empty($guid) && preg_match('/^\{?[a-zA-Z0-9]{8}(?:-[a-zA-Z0-9]{4}){4}[a-zA-Z0-9]{8}\}?$/', $guid); } function email_death($error){