Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-workhorse
Commits
c5e3517a
Commit
c5e3517a
authored
Jul 26, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not leak repo existence information too early
parent
32220657
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
main.go
main.go
+7
-7
No files found.
main.go
View file @
c5e3517a
...
...
@@ -74,13 +74,6 @@ func git_handler(w http.ResponseWriter, r *http.Request) {
for
_
,
g
:=
range
git_services
{
path_match
:=
g
.
regexp
.
FindStringSubmatch
(
r
.
URL
.
Path
)
if
r
.
Method
==
g
.
method
&&
path_match
!=
nil
{
// Validate the path to the Git repository
found_path
:=
path_match
[
1
]
if
!
valid_path
(
found_path
)
{
http
.
Error
(
w
,
"Not found"
,
404
)
return
}
// Ask the auth backend if the request is allowed, and what the
// user ID (GL_ID) is.
auth_response
,
err
:=
do_auth_request
(
r
)
...
...
@@ -110,6 +103,13 @@ func git_handler(w http.ResponseWriter, r *http.Request) {
return
}
// Validate the path to the Git repository
found_path
:=
path_match
[
1
]
if
!
valid_path
(
found_path
)
{
http
.
Error
(
w
,
"Not found"
,
404
)
return
}
g
.
handle_func
(
user
,
g
.
rpc
,
path
.
Join
(
repo_root
,
found_path
),
w
,
r
)
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment