simplify email regex; allow + in user part
This commit is contained in:
parent
bf53d03b3b
commit
1bb61efd32
|
|
@ -221,7 +221,7 @@ function civiproxy_sanitise($value, $type) {
|
|||
}
|
||||
} elseif ($type == 'email') {
|
||||
// valid email
|
||||
if (!preg_match("#^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$#i", $value)) {
|
||||
if (!preg_match("#^[_a-z0-9-]+[._a-z0-9-+]*@[a-z0-9-]+[.a-z0-9-]*\.[a-z]{2,3}$#i", $value)) {
|
||||
error_log("CiviProxy: removed invalid email parameter: " . $value);
|
||||
$value = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue