[email protected] (Eric W. Biederman) writes:
> Eric Wong <[email protected]> writes:
>
>> Eric Wong <[email protected]> wrote:
>>> "Eric W. Biederman" <[email protected]> wrote:
>>> > - $name =~ tr/<>//d;
>>> > + $name =~ tr/\n\r<>$/ /d;
>>>
>>> Is getting rid of '$' an effort to avoid double interpolation by Perl?
>>> Perl won't recursively expand variables AFAIK.
>>
>> I'm not seeing the purpose in $ being grouped with the
>> characters (test below confirms it, I think).
>
> What I think we should be doing is any characters that are not a valid
> part of a name (as defined by the appropriate email RFCs) should be
> dealt with.
>
> I am pretty certain $ isn't of those characters that is valid in a name.
These characters are allowed as names without quoting, RFC 2822 3.2.4:
atext = ALPHA / DIGIT / ; Any character except controls,
"!" / "#" / ; SP, and specials.
"$" / "%" / ; Used for atoms
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
In particular, "." is not included.
hth,
--
Leah Neukirchen <[email protected]> https://leahneukirchen.org/
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/