allow @ in repo names and patterns
stuff like "repo foo/CREATER/.+" means the reponame has to be a superset of the username in terms of allowed characters
This commit is contained in:
parent
a15e910cf8
commit
3eb29e17fc
|
@ -24,11 +24,13 @@ $WARN = "\n\t\t***** WARNING *****\n ";
|
||||||
$R_COMMANDS=qr/^(git[ -]upload-pack|git[ -]upload-archive)$/;
|
$R_COMMANDS=qr/^(git[ -]upload-pack|git[ -]upload-archive)$/;
|
||||||
$W_COMMANDS=qr/^git[ -]receive-pack$/;
|
$W_COMMANDS=qr/^git[ -]receive-pack$/;
|
||||||
|
|
||||||
# note that REPONAME_PATT allows "/", while USERNAME_PATT allows "@"
|
# note that REPONAME_PATT allows "/", while USERNAME_PATT does not
|
||||||
$REPONAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._/-]*$); # very simple pattern
|
# also, the reason REPONAME_PATT is a superset of USERNAME_PATT is (duh!)
|
||||||
|
# because in this version, a repo can have "CREATER" in the name (see docs)
|
||||||
|
$REPONAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@/-]*$); # very simple pattern
|
||||||
$USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@-]*$); # very simple pattern
|
$USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@-]*$); # very simple pattern
|
||||||
# same as REPONAME, plus some common regex metas
|
# same as REPONAME, plus some common regex metas
|
||||||
$REPOPATT_PATT=qr(^\@?[0-9a-zA-Z][\\^.$|()[\]*+?{}0-9a-zA-Z._/-]*$);
|
$REPOPATT_PATT=qr(^\@?[0-9a-zA-Z][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$);
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# convenience subs
|
# convenience subs
|
||||||
|
|
Loading…
Reference in a new issue