]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch...
authorlpsolit%gmail.com <>
Tue, 25 Mar 2008 06:08:16 +0000 (06:08 +0000)
committerlpsolit%gmail.com <>
Tue, 25 Mar 2008 06:08:16 +0000 (06:08 +0000)
email_in.pl

index 422b886f76472526b6ba3b5e4ce6b25db2cdf720..5d1368e4a3c93066fd5f8d9b2bef5acd8fd1e4e3 100644 (file)
@@ -370,6 +370,11 @@ my $mail_text = join("", @mail_lines);
 my $mail_fields = parse_mail($mail_text);
 
 my $username = $mail_fields->{'reporter'};
+# If emailsuffix is in use, we have to remove it from the email address.
+if (my $suffix = Bugzilla->params->{'emailsuffix'}) {
+    $username =~ s/\Q$suffix\E$//i;
+}
+
 my $user = Bugzilla::User->new({ name => $username })
     || ThrowUserError('invalid_username', { name => $username });