aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/renderers.rb
diff options
context:
space:
mode:
authorGreg Campbell <gregc@twitter.com>2014-07-09 11:33:09 -0700
committerGreg Campbell <gregc@twitter.com>2014-07-09 11:37:19 -0700
commit4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6 (patch)
tree2d1628444e02656f6c52a5f030c1ff3d4f7ff2aa /actionpack/lib/action_controller/metal/renderers.rb
parent4c34ad37b2e15731ecf22686fa98755ca0c4757e (diff)
downloadrails-4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6.tar.gz
rails-4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6.tar.bz2
rails-4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6.zip
Address CVE-2014-4671 (JSONP Flash exploit)
Adds a comment before JSONP callbacks. See http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/ for more details on the exploit in question.
Diffstat (limited to 'actionpack/lib/action_controller/metal/renderers.rb')
-rw-r--r--actionpack/lib/action_controller/metal/renderers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb
index ae55e6d7f5..02c4e563f5 100644
--- a/actionpack/lib/action_controller/metal/renderers.rb
+++ b/actionpack/lib/action_controller/metal/renderers.rb
@@ -116,7 +116,7 @@ module ActionController
self.content_type = Mime::JS
end
- "#{options[:callback]}(#{json})"
+ "/**/#{options[:callback]}(#{json})"
else
self.content_type ||= Mime::JSON
json