From e9647853dfee940e96ac164fbf98f0f40260293f Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 10 Oct 2019 00:29:29 +0200 Subject: [PATCH] Updated domain length to 12 For domains like .company .services .business. --- src/psm/Util/Server/ServerValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psm/Util/Server/ServerValidator.php b/src/psm/Util/Server/ServerValidator.php index b4108824..d4b89aee 100644 --- a/src/psm/Util/Server/ServerValidator.php +++ b/src/psm/Util/Server/ServerValidator.php @@ -89,7 +89,7 @@ class ServerValidator { switch ($type) { case 'website': // url regex as per https://stackoverflow.com/a/3809435 - if (!preg_match("/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g", $value)) { + if (!preg_match("/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,12}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g", $value)) { throw new \InvalidArgumentException('server_ip_bad_website'); } break;