user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Leah Neukirchen <leah@vuxu.org>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: Eric Wong <e@yhbt.net>,  meta@public-inbox.org
Subject: Re: [PATCH] t/import: test for nasty characters
Date: Sun, 05 Jul 2020 16:55:46 +0200	[thread overview]
Message-ID: <87sge6ui31.fsf@vuxu.org> (raw)
In-Reply-To: <87a70fnhxp.fsf@x220.int.ebiederm.org> (Eric W. Biederman's message of "Sat, 04 Jul 2020 15:28:34 -0500")

ebiederm@xmission.com (Eric W. Biederman) writes:

> Eric Wong <e@yhbt.net> writes:
>
>> Eric Wong <e@yhbt.net> wrote:
>>> "Eric W. Biederman" <ebiederm@xmission.com> 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  <leah@vuxu.org>  https://leahneukirchen.org/

      parent reply	other threads:[~2020-07-05 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 21:53 [PATCH] Import: Be more careful with names in email Eric W. Biederman
2020-07-03 23:30 ` Eric Wong
2020-07-04 20:25   ` [PATCH] t/import: test for nasty characters Eric Wong
2020-07-04 20:28     ` Eric W. Biederman
2020-07-04 21:24       ` Eric Wong
2020-07-05 14:55       ` Leah Neukirchen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sge6ui31.fsf@vuxu.org \
    --to=leah@vuxu.org \
    --cc=e@yhbt.net \
    --cc=ebiederm@xmission.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).