/[smecontribs]/rpms/smeserver-git/contribs8/smeserver-git-1.0.0-LocationMatch.patch
ViewVC logotype

Annotation of /rpms/smeserver-git/contribs8/smeserver-git-1.0.0-LocationMatch.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Jun 11 17:27:05 2016 UTC (8 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-git-1_0_0-45_el5_sme
* Sat Jun 11 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-45.sme
- fix auth not asked with Location after RewriteRule [SME: 9202]
- add trailing slash to root git url if omited
- only using git/repo.git or git/gitweb.cgi/repo.git will ask for auth

1 unnilennium 1.1 diff -Nur smeserver-git-1.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29GitRepositories smeserver-git-1.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29GitRepositories
2     --- smeserver-git-1.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29GitRepositories 2016-06-11 13:12:40.345000000 -0400
3     +++ smeserver-git-1.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29GitRepositories 2016-06-11 13:20:28.119000000 -0400
4     @@ -300,15 +300,17 @@
5    
6     $OUT .= " # Ensure all /git access is using HTTPS\n";
7     $OUT .= " <Location \"/git\">\n";
8     + $OUT .= " DirectorySlash On\n";
9     $OUT .= " SSLRequireSSL\n";
10     $OUT .= " </Location>\n";
11     $OUT .= "\n";
12    
13     $OUT .= " # Ensure we can browse the repo with http://server.com/git/repo.git\n";
14     $OUT .= " # instead of http://server.com/git?p=repo.git;a=summary.\n";
15     - $OUT .= " RewriteCond %{REQUEST_FILENAME} !-f\n";
16     - $OUT .= " RewriteCond %{REQUEST_FILENAME} !-d\n";
17     - $OUT .= " RewriteRule ^$gitpath\/gitweb.cgi\(\.\*\\.git)\$ $gitpath/gitweb.cgi\$1 [PT]\n";
18     + #$OUT .= " RewriteCond %{REQUEST_FILENAME} !-f\n";
19     + #$OUT .= " RewriteCond %{REQUEST_FILENAME} !-d\n";
20     + #$OUT .= " RewriteRule ^$gitpath\/gitweb.cgi\(\.\*\\.git)\$ $gitpath/gitweb.cgi\$1 [PT]\n";
21     + $OUT .= " RewriteRule ^/git$ /git/ [R]\n";
22    
23     $OUT .= " RewriteCond %{REQUEST_URI} !=$gitpath/gitweb.*\n";
24     $OUT .= " RewriteCond %{REQUEST_FILENAME} !-f\n";
25     @@ -402,7 +404,7 @@
26     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27     #~~~ PULL Access Setup
28    
29     - $OUT .= " <Location \"$gitpath/$git_repository.git\"> # PULL access to $gitpath/$git_repository.git\n";
30     + $OUT .= " <LocationMatch \"^$gitpath/(gitweb.cgi/|)$git_repository.git\"> # PULL access to $gitpath/$git_repository.git\n";
31    
32     if( $effective_pull_users ) {
33     $OUT .= " # PULL Access Control\n";
34     @@ -424,7 +426,7 @@
35     }
36     $OUT .= " Satisfy All\n";
37    
38     - $OUT .= " </Location> # $gitpath/$git_repository.git\n\n";
39     + $OUT .= " </LocationMatch> # $gitpath/$git_repository.git\n\n";
40    
41     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42     #~~~ PUSH Access Setup - uses a virtual /push directory in the path that was

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed