Commit 6daf0659 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 92274: email_in.pl using the From address doesn't work with emailsuffix -…

Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=mkanat
parent 26f4337c
......@@ -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 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment