mirror of https://github.com/MISP/MISP
fix: Relaxed email validation
- because unicode tlds / domains are such a great ideapull/2669/head
parent
f259a51247
commit
325ca46871
|
@ -935,7 +935,7 @@ class Attribute extends AppModel {
|
|||
case 'dns-soa-email':
|
||||
case 'jabber-id':
|
||||
// we don't use the native function to prevent issues with partial email addresses
|
||||
if (preg_match("#^[A-Z0-9._&%$+-=~]*@[A-Z0-9.\-_]+\.[A-Z0-9\-]{2,}$#i", $value)) {
|
||||
if (preg_match("#^.*\@.*\..*$#i", $value)) {
|
||||
$returnValue = true;
|
||||
} else {
|
||||
$returnValue = 'Email address has an invalid format. Please double check the value or select type "other".';
|
||||
|
|
Loading…
Reference in New Issue