--- a/mercurial/hgweb/hgweb_mod.py Mon Jul 25 15:22:18 2011 -0500
+++ b/mercurial/hgweb/hgweb_mod.py Mon Jul 25 16:27:08 2011 -0500
@@ -7,7 +7,7 @@
# GNU General Public License version 2 or any later version.
import os
-from mercurial import ui, hg, hook, error, encoding, templater
+from mercurial import ui, hg, hook, error, encoding, templater, util
from common import get_stat, ErrorResponse, permhooks, caching
from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR
@@ -147,7 +147,7 @@
cmd = cmd[style + 1:]
# avoid accepting e.g. style parameter as command
- if hasattr(webcommands, cmd):
+ if util.safehasattr(webcommands, cmd):
req.form['cmd'] = [cmd]
else:
cmd = ''