Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
b329c0d12c59
Commit
5bf22606
authored
Jan 29, 2017
by
Douwe Maan
Browse files
Fix XSS issue by not using URI.join
parent
7708db6a2cf5
Changes
1
Show whitespace changes
Inline
Side-by-side
app/models/environment.rb
View file @
b329c0d1
...
...
@@ -185,8 +185,7 @@ def external_url_for(path, commit_sha)
public_path
=
project
.
public_path_for_source_path
(
path
,
commit_sha
)
return
unless
public_path
# TODO: Verify this can't be used for XSS
URI
.
join
(
external_url
,
public_path
).
to_s
[
external_url
,
public_path
].
join
(
'/'
)
end
private
...
...
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