Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Partners
CiviCooP
Article 19
CiviProxy
Commits
5763a2b7
Unverified
Commit
5763a2b7
authored
Sep 26, 2019
by
BjoernE
👨👩👧👦
Committed by
GitHub
Sep 26, 2019
Browse files
Merge pull request #36 from d1ss0nanz/master
simplify email regex; allow + in user part
parents
ccb0c413
1bb61efd
Changes
1
Hide whitespace changes
Inline
Side-by-side
proxy/proxy.php
View file @
5763a2b7
...
...
@@ -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
=
''
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment