deprecation warning about old style PATH/ syntax
(this commit will probably get reverted after a suitable period has elapsed and no one is likely to still be using the old syntax). Forgetting to change it to NAME/ after is a security issue -- you end up permitting stuff you don't want to! This commit allows the old syntax but prints a warning
This commit is contained in:
parent
7124faa9f3
commit
08ef3555a1
|
@ -200,6 +200,8 @@ sub parse_conf_file
|
||||||
|
|
||||||
# if no ref is given, this PERM applies to all refs
|
# if no ref is given, this PERM applies to all refs
|
||||||
@refs = qw(refs/.*) unless @refs;
|
@refs = qw(refs/.*) unless @refs;
|
||||||
|
# deprecation warning
|
||||||
|
map { warn "WARNING: old syntax 'PATH/' found; please use new syntax 'NAME/'\n" if s(^PATH/)(NAME/) } @refs;
|
||||||
# fully qualify refs that dont start with "refs/" or "NAME/";
|
# fully qualify refs that dont start with "refs/" or "NAME/";
|
||||||
# prefix them with "refs/heads/"
|
# prefix them with "refs/heads/"
|
||||||
@refs = map { m(^(refs|NAME)/) or s(^)(refs/heads/); $_ } @refs;
|
@refs = map { m(^(refs|NAME)/) or s(^)(refs/heads/); $_ } @refs;
|
||||||
|
|
Loading…
Reference in a new issue