Skip to content

Commit

Permalink
Disallow comma character within email addresses in email and email_on…
Browse files Browse the repository at this point in the history
…ly profile checks (GH #97).
  • Loading branch information
melmothx authored and racke committed Jun 7, 2016
1 parent ebf8bd1 commit 4ff70c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/OrderCheck/email_only.oc
Expand Up @@ -12,7 +12,7 @@ CodeDef email_only Description Email address
CodeDef email_only Routine <<EOR
sub {
my($ref, $var, $val, $msg) = @_;
if($val and $val =~ /^[\040-\077\101-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+$/) {
if($val and $val =~ /^[\040-\053\055-\077\101-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+$/) {
return (1, $var, '');
}
else {
Expand Down
3 changes: 2 additions & 1 deletion lib/Vend/Order.pm
Expand Up @@ -1344,7 +1344,8 @@ sub _phone_us_with_area_strict {

sub _email {
my($ref, $var, $val) = @_;
if($val and $val =~ /[\040-\077\101-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+/) {
if($val and $val =~ /[\040-\053\055-\077\101-\176]+\@[-A-Za-z0-9.]+\.[A-Za-z]+/) {

return (1, $var, '');
}
else {
Expand Down

0 comments on commit 4ff70c2

Please sign in to comment.