Merge pull request #36 from d1ss0nanz/master

simplify email regex; allow + in user part
This commit is contained in:
Björn Endres 2019-09-26 15:12:52 +02:00 committed by GitHub
commit 5763a2b792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '';
}