fix: relaxed the TLD validation for domains / hostnames, fixes #1977

pull/2002/head
iglocska 2017-02-23 10:19:17 +01:00
parent ce9085a303
commit f9cafc5ecb
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ class Attribute extends AppModel {
break;
case 'hostname':
case 'domain':
if (preg_match("#^[A-Z0-9.\-_]+\.[A-Z]{2,}$#i", $value)) {
if (preg_match("#^[A-Z0-9.\-_]+\.[A-Z0-9\-]{2,}$#i", $value)) {
$returnValue = true;
} else {
$returnValue = 'Domain name has an invalid format. Please double check the value or select type "other".';