From 6daf06596dcdf0422624ce283ebcccbfe528bb24 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 25 Mar 2008 06:06:16 +0000 Subject: =?UTF-8?q?Bug=2092274:=20email=5Fin.pl=20using=20the=20From=20add?= =?UTF-8?q?ress=20doesn't=20work=20with=20emailsuffix=20-=20Patch=20by=20F?= =?UTF-8?q?r=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20?= =?UTF-8?q?r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_in.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'email_in.pl') 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 }); -- cgit v1.2.1