mirror of
https://github.com/redmine/redmine.git
synced 2026-02-16 03:28:04 +01:00
Merged r22294 and r22295 from trunk to 5.0-stable (#38417).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22296 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -89,7 +89,7 @@ class AttachmentsController < ApplicationController
|
||||
tbnail,
|
||||
:filename => filename_for_content_disposition(@attachment.filename),
|
||||
:type => detect_content_type(@attachment, true),
|
||||
:disposition => 'inline')
|
||||
:disposition => 'attachment')
|
||||
end
|
||||
else
|
||||
# No thumbnail for the attachment or thumbnail could not be created
|
||||
@@ -321,4 +321,9 @@ class AttachmentsController < ApplicationController
|
||||
request.raw_post
|
||||
end
|
||||
end
|
||||
|
||||
def send_file(path, options={})
|
||||
headers['content-security-policy'] = "default-src 'none'; style-src 'unsafe-inline'; sandbox"
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
@@ -433,6 +433,11 @@ class RepositoriesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def send_file(path, options={})
|
||||
headers['content-security-policy'] = "default-src 'none'; style-src 'unsafe-inline'; sandbox"
|
||||
super
|
||||
end
|
||||
|
||||
def valid_name?(rev)
|
||||
return true if rev.nil?
|
||||
return true if REV_PARAM_RE.match?(rev)
|
||||
|
||||
Reference in New Issue
Block a user