Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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-ce
Commits
aad45011
Commit
aad45011
authored
Aug 28, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'stable-xss-fix' into '7-2-stable'
Stable xss fix See merge request !1048
parents
dc42aae3
ac24a5a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
app/controllers/projects/raw_controller.rb
app/controllers/projects/raw_controller.rb
+2
-4
No files found.
app/controllers/projects/raw_controller.rb
View file @
aad45011
...
@@ -29,12 +29,10 @@ class Projects::RawController < Projects::ApplicationController
...
@@ -29,12 +29,10 @@ class Projects::RawController < Projects::ApplicationController
private
private
def
get_blob_type
def
get_blob_type
if
@blob
.
mime_type
=~
/html|javascript/
if
@blob
.
text?
'text/plain; charset=utf-8'
'text/plain; charset=utf-8'
elsif
@blob
.
name
=~
/(?:msi|exe|rar|r0\d|7z|7zip|zip)$/
'application/octet-stream'
else
else
@blob
.
mime_type
'application/octet-stream'
end
end
end
end
end
end
...
...
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