BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0169dd7f
Commit
0169dd7f
authored
Sep 15, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes project denial of service via gitmodules using Extended ASCII.
parent
5d3f7b13
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
submodule_helper.rb
app/helpers/submodule_helper.rb
+4
-0
34259-project-denial-of-service-via-gitmodules-fix.yml
...ed/34259-project-denial-of-service-via-gitmodules-fix.yml
+5
-0
submodule_helper_spec.rb
spec/helpers/submodule_helper_spec.rb
+6
-0
No files found.
app/helpers/submodule_helper.rb
View file @
0169dd7f
...
...
@@ -87,10 +87,14 @@ module SubmoduleHelper
namespace
=
@project
.
namespace
.
full_path
end
begin
[
namespace_project_path
(
namespace
,
base
),
namespace_project_tree_path
(
namespace
,
base
,
commit
)
]
rescue
ActionController
::
UrlGenerationError
[
nil
,
nil
]
end
end
def
sanitize_submodule_url
(
url
)
...
...
changelogs/unreleased/34259-project-denial-of-service-via-gitmodules-fix.yml
0 → 100644
View file @
0169dd7f
---
title
:
Fixes project denial of service via gitmodules using Extended ASCII.
merge_request
:
14301
author
:
type
:
fixed
spec/helpers/submodule_helper_spec.rb
View file @
0169dd7f
...
...
@@ -147,6 +147,12 @@ describe SubmoduleHelper do
expect
(
helper
.
submodule_links
(
submodule_item
)).
to
eq
([
nil
,
nil
])
end
it
'sanitizes invalid URL with extended ASCII'
do
stub_url
(
'é'
)
expect
(
helper
.
submodule_links
(
submodule_item
)).
to
eq
([
nil
,
nil
])
end
it
'returns original'
do
stub_url
(
'http://mygitserver.com/gitlab-org/gitlab-ce'
)
expect
(
submodule_links
(
submodule_item
)).
to
eq
([
repo
.
submodule_url_for
,
nil
])
...
...
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