From ab23f0f051a804b34076593971af790a0c2b0e34 Mon Sep 17 00:00:00 2001 From: Adirelle Date: Mon, 27 May 2013 13:15:23 +0200 Subject: [PATCH] Refuse all requests involved in git push if the user has no write permission. Fixes #1. --- Redmine.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Redmine.pm b/Redmine.pm index e068f2c..fed503e 100644 --- a/Redmine.pm +++ b/Redmine.pm @@ -565,8 +565,7 @@ sub is_read_request { if($cfg->{RepositoryType} eq "Subversion") { return defined $read_only_methods{$r->method}; } else { - my $quoted_location = quotemeta($r->location); - return $r->uri !~ m@^$quoted_location/.*/git-receive-pack$@; + return $r->unparsed_uri !~ m@[=/]git-receive-pack@; } }