From: Junio C Hamano <gitster@pobox.com>
To: Joe Perches <joe@perches.com>
Cc: kusmabite@gmail.com, git <git@vger.kernel.org>
Subject: Re: git-send-email.perl defect: address missing trailing > accepted
Date: Tue, 20 Oct 2009 16:28:59 -0700 [thread overview]
Message-ID: <7vy6n5k5l0.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1256079633.2029.81.camel@Joe-Laptop.home> (Joe Perches's message of "Tue\, 20 Oct 2009 16\:00\:33 -0700")
Joe Perches <joe@perches.com> writes:
> It seems that the regex for address validation
> isn't very good and perhaps there could/should
> be a stronger validation done for each address
> entered.
The existing ones are actually already harmful. It would trigger on a
valid addresses like this, wouldn't it?
To: "Hamano, Jun" <gitster@pobox.com>
It is worse than that.
The "# Verify the user input" block is in a wrong place in the codepath.
After @to goes through this bogus "verification" step, it then is given to
expand_aliases(), which may expand to real addresses. And then they pass
through sanitize_address() before getting used.
Three implications that come from this wrong code structure are:
(1) The stricter checks you added on top of the existing bogus
verification step may prevent @to to reach expand_aliases() step,
even if the tokens in @to may expand to correct addresses by this
expand_aliases() step if they were allowed to reach here;
(2) The result from expand_aliases() is never checked.
(3) The result from sanitize_address() is not checked either.
prev parent reply other threads:[~2009-10-20 23:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 22:12 git-send-email.perl defect: address missing trailing > accepted Joe Perches
2009-10-20 22:29 ` Erik Faye-Lund
2009-10-20 22:48 ` Joe Perches
2009-10-20 22:56 ` Erik Faye-Lund
2009-10-20 23:00 ` Joe Perches
2009-10-20 23:28 ` Junio C Hamano [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vy6n5k5l0.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=joe@perches.com \
--cc=kusmabite@gmail.com \
/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.
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 NNTP newsgroup(s).