mirror of https://github.com/MISP/MISP
fix: relaxed the TLD validation for domains / hostnames, fixes #1977
parent
ce9085a303
commit
f9cafc5ecb
|
@ -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".';
|
||||
|
|
Loading…
Reference in New Issue