People: please read and weigh in if you have an opinion!
On Sun, Aug 13, 2017 at 12:41:54PM -0400, David Bremner wrote:
>
> A Debian user makes the following request [0]. At least the part about
> allowing % seems sensible to me. I'm not sure about ':' ; it does occur
> in filenames on my systems (mainly in Maildirs, fwiw).
Let's deal with the simpler one first: I actually think colon is
safe -- neither variable interpolation nor code execution seem
to be possible with it. I have no idea why git does not allow
it in refs; if someone knows, please let us know.
As for the "%", I'm going to punt on this, in the sense that I'd
like you all to weigh in on what they think.
When I originally set up those restrictions, I made them as
paranoid as possible, while making it possible for any admin to
locally relax those restrictions.
Since that mechanism exists (as the bug report below also
notes), any *shipped* changes to these patterns must be
unquestionably safe.
Is "%" unquestionably safe? I don't know. It seems safe enough
-- I only know it is used in various format specifiers. Can
someone find a creative way to use that against a server?
Just because *I* can't think of some way to use it in an attack
does not mean someone else cannot.
(If you've seen the recent git/hg/svn/etc vuln that is basically
caused by allowing a leading "-" in an ssh URL, you'll see how
simple in hindsight something is, even if we never thought of it
in advance. Almost every VCS that allows ssh access is
apparently affected by this!)
regards
sitaram
>
> Package: gitolite3
> Version: 3.6.1-2+deb8u2
> Severity: wishlist
>
> Hello,
>
> Following DEP14[1] to name my tags for debian packaging I use % in
> tagnames. When I then try to push such a tag to a gitolite instance I
> get:
>
> remote: FATAL: invalid characters in ref or filename: 'refs/tags/debian/1%1.6.22-1'
>
> The reason is that $REF_OR_FILENAME_PATT doesn't allow % in a ref name.
> This can be easily fixed by setting this variable in
> ~gitolite/.gitolite.rc like:
>
> $REF_OR_FILENAME_PATT = qr(^[0-9a-zA-Z][-0-9a-zA-Z._\@/+ :,%]*$);
>
> . But I wonder why gitolite is restrictive here and wish that % was be
> allowed by default. (Side note: git doesn't allow : in refnames, so
> there more changes to REF_OR_FILENAME_PATT might be sensible.)
>
> Best regards
> Uwe
>
> [0]
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871632
> [1]
http://dep.debian.net/deps/dep14/
>
> --
> You received this message because you are subscribed to the Google Groups "gitolite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
gitolite+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.