Updated domain length to 12

For domains like .company .services .business.
This commit is contained in:
Tim 2019-10-10 00:29:29 +02:00 committed by GitHub
parent 94d4ffc8aa
commit e9647853df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;