##// END OF EJS Templates
hgwebmod: use sysstr to check for attribute presence...
marmoute -
r51789:b2b8c25f default
parent child Browse files
Show More
@@ -403,7 +403,7 b' class hgweb:'
403 403 cmd = cmd[style + 1 :]
404 404
405 405 # avoid accepting e.g. style parameter as command
406 if util.safehasattr(webcommands, cmd):
406 if util.safehasattr(webcommands, pycompat.sysstr(cmd)):
407 407 req.qsparams[b'cmd'] = cmd
408 408
409 409 if cmd == b'static':
@@ -474,7 +474,7 b' class hgweb:'
474 474 # override easily enough.
475 475 res.status = b'200 Script output follows'
476 476 res.headers[b'Content-Type'] = ctype
477 return getattr(webcommands, cmd)(rctx)
477 return getattr(webcommands, pycompat.sysstr(cmd))(rctx)
478 478
479 479 except (error.LookupError, error.RepoLookupError) as err:
480 480 msg = pycompat.bytestr(err)
General Comments 0
You need to be logged in to leave comments. Login now