diff options
author | Greg Campbell <gregc@twitter.com> | 2014-07-09 11:33:09 -0700 |
---|---|---|
committer | Greg Campbell <gregc@twitter.com> | 2014-07-09 11:37:19 -0700 |
commit | 4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6 (patch) | |
tree | 2d1628444e02656f6c52a5f030c1ff3d4f7ff2aa /actionpack/lib | |
parent | 4c34ad37b2e15731ecf22686fa98755ca0c4757e (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_controller/metal/renderers.rb | 2 |
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 |