summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanis Streib <janis@dogcraft.de>2015-01-14 11:41:18 +0100
committerJanis Streib <janis@dogcraft.de>2015-01-14 12:16:33 +0100
commit1439176e62ab63d6ab522b07ca18213e56c24bf4 (patch)
tree8b303ec36562653bb3e1611d9908ed08635e0713
parente18bdfeac8e0d6f6082e7fb3d3ef32bf61fd457e (diff)
downloadcacert-devel-bug-1317.tar.gz
cacert-devel-bug-1317.tar.xz
cacert-devel-bug-1317.zip
bug-1317: FIX: Added + to GPG mail-check regexesbug-1317
-rw-r--r--www/gpg.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/www/gpg.php b/www/gpg.php
index cb72475..0f5669d 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -191,7 +191,7 @@ function verifyEmail($email)
}
// Name (Comment) <Email>
- if(preg_match("/^([^\(\)\[@<>]+) \(([^\(\)@<>]*)\) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
+ if(preg_match("/^([^\(\)\[@<>]+) \(([^\(\)@<>]*)\) <([\w=\/%+.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
$name=trim(gpg_hex2bin($matches[1]));
$nocomment=0;
@@ -199,7 +199,7 @@ function verifyEmail($email)
$mail=trim(gpg_hex2bin($matches[3]));
}
// Name <EMail>
- elseif(preg_match("/^([^\(\)\[@<>]+) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
+ elseif(preg_match("/^([^\(\)\[@<>]+) <([\w=\/%+.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
$name=trim(gpg_hex2bin($matches[1]));
$nocomment=1;
@@ -378,7 +378,7 @@ function verifyEmail($email)
}
$mail="";
- if (preg_match("/<([\w.-]*\@[\w.-]*)>/", $bits[9],$match)) {
+ if (preg_match("/<([\w=\/%+.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/", $bits[9],$match)) {
//echo "Found: ".$match[1];
$mail = trim(gpg_hex2bin($match[1]));
}