summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 06022ce7c..e673a920e 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -690,9 +690,8 @@ sub generate_random_password {
}
sub validate_email_syntax {
- my ($addr) = @_;
+ my ($email) = @_;
my $match = Bugzilla->params->{'emailregexp'};
- my $email = $addr . Bugzilla->params->{'emailsuffix'};
# This regexp follows RFC 2822 section 3.4.1.
my $addr_spec = $Email::Address::addr_spec;
# RFC 2822 section 2.1 specifies that email addresses must
@@ -700,7 +699,7 @@ sub validate_email_syntax {
# Email::Address::addr_spec doesn't enforce this.
# We set the max length to 127 to ensure addresses aren't truncated when
# inserted into the tokens.eventdata field.
- if ($addr =~ /$match/
+ if ($email =~ /$match/
&& $email !~ /\P{ASCII}/
&& $email =~ /^$addr_spec$/
&& length($email) <= 127)
@@ -713,11 +712,10 @@ sub validate_email_syntax {
}
sub check_email_syntax {
- my ($addr) = @_;
+ my ($email) = @_;
unless (validate_email_syntax(@_)) {
- my $email = $addr . Bugzilla->params->{'emailsuffix'};
- ThrowUserError('illegal_email_address', { addr => $email });
+ ThrowUserError('illegal_email_address', { email => $email });
}
}