Unverified Commit 5763a2b7 authored by BjoernE's avatar BjoernE 👨‍👩‍👧‍👦 Committed by GitHub
Browse files

Merge pull request #36 from d1ss0nanz/master

simplify email regex; allow + in user part
parents ccb0c413 1bb61efd
......@@ -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 = '';
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment