Show More
@@ -7,7 +7,7 b'' | |||||
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | import os |
|
9 | import os | |
10 | from mercurial import ui, hg, hook, error, encoding, templater |
|
10 | from mercurial import ui, hg, hook, error, encoding, templater, util | |
11 | from common import get_stat, ErrorResponse, permhooks, caching |
|
11 | from common import get_stat, ErrorResponse, permhooks, caching | |
12 | from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST |
|
12 | from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST | |
13 | from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
|
13 | from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR | |
@@ -147,7 +147,7 b' class hgweb(object):' | |||||
147 | cmd = cmd[style + 1:] |
|
147 | cmd = cmd[style + 1:] | |
148 |
|
148 | |||
149 | # avoid accepting e.g. style parameter as command |
|
149 | # avoid accepting e.g. style parameter as command | |
150 | if hasattr(webcommands, cmd): |
|
150 | if util.safehasattr(webcommands, cmd): | |
151 | req.form['cmd'] = [cmd] |
|
151 | req.form['cmd'] = [cmd] | |
152 | else: |
|
152 | else: | |
153 | cmd = '' |
|
153 | cmd = '' |
General Comments 0
You need to be logged in to leave comments.
Login now