From 6daf06596dcdf0422624ce283ebcccbfe528bb24 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 25 Mar 2008 06:06:16 +0000 Subject: [PATCH] =?utf8?q?Bug=2092274:=20email=5Fin.pl=20using=20the=20Fro?= =?utf8?q?m=20address=20doesn't=20work=20with=20emailsuffix=20-=20Patch=20?= =?utf8?q?by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- email_in.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/email_in.pl b/email_in.pl index 248b86bb8d..e23da4317f 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 }); -- 2.47.2