summaryrefslogtreecommitdiffstats
path: root/email_in.pl
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-03-25 07:06:16 +0100
committerlpsolit%gmail.com <>2008-03-25 07:06:16 +0100
commit6daf06596dcdf0422624ce283ebcccbfe528bb24 (patch)
treee8bdbde11e1cb047eecb7ff25feba9f2926fbfe4 /email_in.pl
parent26f4337cd484e3c9553d0def4a4fc58ecf8cdc6a (diff)
downloadbugzilla-6daf06596dcdf0422624ce283ebcccbfe528bb24.tar.gz
bugzilla-6daf06596dcdf0422624ce283ebcccbfe528bb24.tar.xz
Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'email_in.pl')
-rw-r--r--email_in.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/email_in.pl b/email_in.pl
index 248b86bb8..e23da4317 100644
--- a/email_in.pl
+++ b/email_in.pl
@@ -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 });