Fix XSS issue by not using URI.join

This commit is contained in:
Douwe Maan 2017-01-29 15:31:13 -06:00
parent 27f2ca9418
commit 5bf22606ef
1 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,7 @@ class Environment < ActiveRecord::Base
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