]> 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:06:16 +0000 (06:06 +0000)
committerlpsolit%gmail.com <>
Tue, 25 Mar 2008 06:06:16 +0000 (06:06 +0000)
email_in.pl

index 248b86bb8d24dfffc33cc391d1f1fd39bcc13c2b..e23da4317f48dd1405c5c96084bcb60ff116df19 100644 (file)
@@ -330,6 +330,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 });