Show More
@@ -1352,6 +1352,9 b" coreconfigitem('web', 'refreshinterval'," | |||||
1352 | coreconfigitem('web', 'server-header', |
|
1352 | coreconfigitem('web', 'server-header', | |
1353 | default=None, |
|
1353 | default=None, | |
1354 | ) |
|
1354 | ) | |
|
1355 | coreconfigitem('web', 'static', | |||
|
1356 | default=None, | |||
|
1357 | ) | |||
1355 | coreconfigitem('web', 'staticurl', |
|
1358 | coreconfigitem('web', 'staticurl', | |
1356 | default=None, |
|
1359 | default=None, | |
1357 | ) |
|
1360 | ) |
@@ -383,8 +383,7 b' class hgwebdir(object):' | |||||
383 | fname = virtual[7:] |
|
383 | fname = virtual[7:] | |
384 | else: |
|
384 | else: | |
385 | fname = req.qsparams['static'] |
|
385 | fname = req.qsparams['static'] | |
386 |
static = self.ui.config("web", "static", |
|
386 | static = self.ui.config("web", "static", untrusted=False) | |
387 | untrusted=False) |
|
|||
388 | if not static: |
|
387 | if not static: | |
389 | tp = self.templatepath or templater.templatepaths() |
|
388 | tp = self.templatepath or templater.templatepaths() | |
390 | if isinstance(tp, str): |
|
389 | if isinstance(tp, str): |
@@ -1221,7 +1221,7 b' def static(web):' | |||||
1221 | fname = web.req.qsparams['file'] |
|
1221 | fname = web.req.qsparams['file'] | |
1222 | # a repo owner may set web.static in .hg/hgrc to get any file |
|
1222 | # a repo owner may set web.static in .hg/hgrc to get any file | |
1223 | # readable by the user running the CGI script |
|
1223 | # readable by the user running the CGI script | |
1224 |
static = web.config("web", "static", |
|
1224 | static = web.config("web", "static", untrusted=False) | |
1225 | if not static: |
|
1225 | if not static: | |
1226 | tp = web.templatepath or templater.templatepaths() |
|
1226 | tp = web.templatepath or templater.templatepaths() | |
1227 | if isinstance(tp, str): |
|
1227 | if isinstance(tp, str): |
General Comments 0
You need to be logged in to leave comments.
Login now