##// 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 cmd = cmd[style + 1 :]
403 cmd = cmd[style + 1 :]
404
404
405 # avoid accepting e.g. style parameter as command
405 # avoid accepting e.g. style parameter as command
406 if util.safehasattr(webcommands, cmd):
406 if util.safehasattr(webcommands, pycompat.sysstr(cmd)):
407 req.qsparams[b'cmd'] = cmd
407 req.qsparams[b'cmd'] = cmd
408
408
409 if cmd == b'static':
409 if cmd == b'static':
@@ -474,7 +474,7 b' class hgweb:'
474 # override easily enough.
474 # override easily enough.
475 res.status = b'200 Script output follows'
475 res.status = b'200 Script output follows'
476 res.headers[b'Content-Type'] = ctype
476 res.headers[b'Content-Type'] = ctype
477 return getattr(webcommands, cmd)(rctx)
477 return getattr(webcommands, pycompat.sysstr(cmd))(rctx)
478
478
479 except (error.LookupError, error.RepoLookupError) as err:
479 except (error.LookupError, error.RepoLookupError) as err:
480 msg = pycompat.bytestr(err)
480 msg = pycompat.bytestr(err)
General Comments 0
You need to be logged in to leave comments. Login now