Merge pull request #36 from d1ss0nanz/master
simplify email regex; allow + in user part
This commit is contained in:
commit
5763a2b792
|
|
@ -231,7 +231,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