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

Bug 278414: Cannot add 'cc' notification for Flags when using emailsuffixes -…

Bug 278414: Cannot add 'cc' notification for Flags when using emailsuffixes - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
parent 6cbc51f4
...@@ -498,9 +498,17 @@ sub validateCCList { ...@@ -498,9 +498,17 @@ sub validateCCList {
{ cc_list => $cc_list }); { cc_list => $cc_list });
my @addresses = split(/[, ]+/, $cc_list); my @addresses = split(/[, ]+/, $cc_list);
# We do not call Util::validate_email_syntax because these
# addresses do not require to match 'emailregexp' and do not
# depend on 'emailsuffix'. So we limit ourselves to a simple
# sanity check:
# - match the syntax of a fully qualified email address;
# - do not contain any illegal character.
foreach my $address (@addresses) { foreach my $address (@addresses) {
validate_email_syntax($address) ($address =~ /^[\w\.\+\-=]+@[\w\.\-]+\.[\w\-]+$/
|| ThrowUserError('illegal_email_address', {addr => $address}); && $address !~ /[\\\(\)<>&,;:"\[\] \t\r\n]/)
|| ThrowUserError('illegal_email_address',
{addr => $address, default => 1});
} }
trick_taint($cc_list); trick_taint($cc_list);
return $cc_list; return $cc_list;
......
...@@ -557,7 +557,12 @@ ...@@ -557,7 +557,12 @@
[% title = "Invalid Email Address" %] [% title = "Invalid Email Address" %]
The e-mail address you entered (<b>[% addr FILTER html %]</b>) The e-mail address you entered (<b>[% addr FILTER html %]</b>)
didn't pass our syntax checking for a legal email address. didn't pass our syntax checking for a legal email address.
[% IF default %]
A legal address must contain exactly one '@',
and at least one '.' after the @.
[% ELSE %]
[%+ Param('emailregexpdesc') %] [%+ Param('emailregexpdesc') %]
[% END %]
It must also not contain any of these special characters: It must also not contain any of these special characters:
<tt>\ ( ) &amp; &lt; &gt; , ; : &quot; [ ]</tt>, or any whitespace. <tt>\ ( ) &amp; &lt; &gt; , ; : &quot; [ ]</tt>, or any whitespace.
......
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