Make JSONP support optional and disabled by default (#12992).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11272 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -25,7 +25,10 @@ module Redmine
|
||||
|
||||
def initialize(request, response)
|
||||
super
|
||||
self.jsonp = (request.params[:callback] || request.params[:jsonp]).to_s.gsub(/[^a-zA-Z0-9_]/, '')
|
||||
callback = request.params[:callback] || request.params[:jsonp]
|
||||
if callback && Setting.jsonp_enabled?
|
||||
self.jsonp = callback.to_s.gsub(/[^a-zA-Z0-9_]/, '')
|
||||
end
|
||||
end
|
||||
|
||||
def output
|
||||
|
||||
Reference in New Issue
Block a user