[PATCH 1 of 2] hgweb: allow static content when deny_read denies access

Mark Edgington edgimar at gmail.com
Fri Jan 2 18:34:05 CST 2009


# HG changeset patch
# User Mark Edgington <edgimar at gmail.com>
# Date 1226262569 -3600
# Node ID 402f5fddd67235a50b6a5b2bd7f997ba6d73d9cf
# Parent  e05aa73ce2b7f7444312c661fecfd3e8df8a1d6e
hgweb: allow static content when deny_read denies access

diff -r e05aa73ce2b7 -r 402f5fddd672 mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Fri Jan 02 22:53:33 2009 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Nov 09 21:29:29 2008 +0100
@@ -165,8 +165,9 @@
             ctype = tmpl('mimetype', encoding=self.encoding)
             ctype = templater.stringify(ctype)
 
-            # check allow_read / deny_read config options
-            self.check_perm(req, None)
+            # check allow_read / deny_read config options for non-static content
+            if cmd != 'static':
+                self.check_perm(req, None)
 
             if cmd == '':
                 req.form['cmd'] = [tmpl.cache['default']]


More information about the Mercurial-devel mailing list