[viewvc] Add default authorisation for CGI scripts too.

bojan bojan at fedoraproject.org
Sat Jan 12 09:32:46 UTC 2013


commit 2e1cd2445bc3df3267f00ac9d31f4f39640c0f94
Author: Bojan Smojver <bojan at rexursive.com>
Date:   Sat Jan 12 20:31:52 2013 +1100

    Add default authorisation for CGI scripts too.

 viewvc-fcgi.conf |   15 +++++++++++++++
 viewvc-wsgi.conf |   15 +++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/viewvc-fcgi.conf b/viewvc-fcgi.conf
index a2fd927..d51a7ff 100644
--- a/viewvc-fcgi.conf
+++ b/viewvc-fcgi.conf
@@ -1,6 +1,21 @@
 ScriptAlias /viewvc __python_sitelib__/viewvc/bin/wsgi/viewvc.fcgi
 Alias /viewvc-static __datadir__/viewvc/templates/docroot
 
+<Directory __python_sitelib__/viewvc/bin/wsgi>
+    Options -Indexes
+    <Files viewvc.fcgi>
+        <IfModule mod_authz_core.c>
+            # Apache 2.4
+            Require local
+        </IfModule>
+        <IfModule !mod_authz_core.c>
+            # Apache 2.2
+            Order allow,deny
+            Allow from 127.0.0.1
+            Allow from ::1
+        </IfModule>
+    </Files>
+</Directory>
 <Directory __datadir__/viewvc/templates/docroot>
     Options -Indexes
     <IfModule mod_authz_core.c>
diff --git a/viewvc-wsgi.conf b/viewvc-wsgi.conf
index 4fe0725..9207b84 100644
--- a/viewvc-wsgi.conf
+++ b/viewvc-wsgi.conf
@@ -1,6 +1,21 @@
 WSGIScriptAlias /viewvc __python_sitelib__/viewvc/bin/wsgi/viewvc.wsgi
 Alias /viewvc-static __datadir__/viewvc/templates/docroot
 
+<Directory __python_sitelib__/viewvc/bin/wsgi>
+    Options -Indexes
+    <Files viewvc.wsgi>
+        <IfModule mod_authz_core.c>
+            # Apache 2.4
+            Require local
+        </IfModule>
+        <IfModule !mod_authz_core.c>
+            # Apache 2.2
+            Order allow,deny
+            Allow from 127.0.0.1
+            Allow from ::1
+        </IfModule>
+    </Files>
+</Directory>
 <Directory __datadir__/viewvc/templates/docroot>
     Options -Indexes
     <IfModule mod_authz_core.c>


More information about the scm-commits mailing list