changeset 3556:c3043ebe40a0

use untrusted settings in hgwebdir
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 26 Oct 2006 19:25:45 +0200
parents 881064004fd0
children f7dee427cd14
files mercurial/hgweb/hgwebdir_mod.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Oct 26 19:25:45 2006 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Oct 26 19:25:45 2006 +0200
@@ -87,9 +87,10 @@
                                              "url": url})
 
         def archivelist(ui, nodeid, url):
-            allowed = ui.configlist("web", "allow_archive")
+            allowed = ui.configlist("web", "allow_archive", untrusted=True)
             for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
-                if i[0] in allowed or ui.configbool("web", "allow" + i[0]):
+                if i[0] in allowed or ui.configbool("web", "allow" + i[0],
+                                                    untrusted=True):
                     yield {"type" : i[0], "extension": i[1],
                            "node": nodeid, "url": url}
 
@@ -114,7 +115,8 @@
                     u.readconfig(os.path.join(path, '.hg', 'hgrc'))
                 except IOError:
                     pass
-                get = u.config
+                def get(section, name, default=None):
+                    return u.config(section, name, default, untrusted=True)
 
                 url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name])
                        .replace("//", "/")) + '/'