From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: Martin Atukunda <matlads@dsmagic.com>, git@vger.kernel.org
Subject: Re: [PATCH] [COGITO] make cg-tag use git-check-ref-format
Date: Tue, 13 Dec 2005 18:00:15 +0100 [thread overview]
Message-ID: <20051213170015.GD22159@pasky.or.cz> (raw)
In-Reply-To: <7vy82p9rnb.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Tue, Dec 13, 2005 at 12:13:12PM CET, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Martin Atukunda <matlads@dsmagic.com> writes:
>
> > The egrep pattern used by cg-tag is too restrictive. While it will prevent
> > control characters from being specified as a tag name, it will also reject
> > nearly anything written in a non-English language, as noted by -hpa
> >...
> > -(echo $name | egrep -qv '[^a-zA-Z0-9_.@!:-]') || \
> > +git-check-ref-format $name || \
> > die "name contains invalid characters"
>
> Perhaps you meant to say:
>
> git-check-ref-format "$name"
>
> instead; after all you are dealing with potentially garbage
> input from the user here.
>
> While you are at it, you might want to also quote $_git/refs/tags
> immediately follows the part that you patched, and there is
> another.
Thank you both for the patch, but I'd be much more comfortable if at
least quotes (both ' and "), backslashes, ? and * would be prohibited in
the names as well. Any chance of also implementing this policy upstream?
Taken to the extreme, using such a names for tags might be perceived as
a possible security vulnerability wrt. the less shell-savy users. ;-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
next prev parent reply other threads:[~2005-12-13 17:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 10:54 [PATCH] [COGITO] make cg-tag use git-check-ref-format Martin Atukunda
2005-12-13 11:13 ` Junio C Hamano
2005-12-13 11:28 ` Martin Atukunda
2005-12-13 17:00 ` Petr Baudis [this message]
2005-12-13 18:41 ` Junio C Hamano
2005-12-15 22:24 ` Alex Riesen
2005-12-15 23:38 ` Junio C Hamano
2005-12-16 2:17 ` Junio C Hamano
2005-12-16 9:17 ` Petr Baudis
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=20051213170015.GD22159@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=matlads@dsmagic.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).