Comments
Patch
@@ -1461,6 +1461,10 @@
Whether to require that inbound pushes be transported over SSL to
prevent password sniffing. Default is True.
+``revsetblacklist``
+ List of revset functions which are not allowed in search queries.
+ Default is 'contains'.
+
``staticurl``
Base URL to use for static files. If unset, static files (e.g. the
hgicon.png favicon) will be served by the CGI script itself. Use
@@ -211,7 +211,11 @@
# can't parse to a tree
modename = 'kw'
else:
- if revset.depth(tree) > 2:
+ funcsused = revset.funcsused(tree)
+ blacklist = web.configlist('web', 'revsetblacklist', ['contains'])
+ blacklist = set(blacklist)
+
+ if revset.depth(tree) > 2 and not funcsused & blacklist:
mfunc = revset.match(None, revdef)
try:
# try running against empty subset
@@ -221,7 +225,7 @@
# can't run the revset query, e.g. some function misspelled
modename = 'kw'
else:
- # no revset syntax used
+ # no revset syntax used or blacklisted functions in the query
modename = 'kw'
searchfunc = searchfuncs[modename]