aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/mime/respond_to_test.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/test/controller/mime/respond_to_test.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/test/controller/mime/respond_to_test.rb')
-rw-r--r--actionpack/test/controller/mime/respond_to_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb
index c89b95de3b..1bc7ad3015 100644
--- a/actionpack/test/controller/mime/respond_to_test.rb
+++ b/actionpack/test/controller/mime/respond_to_test.rb
@@ -520,7 +520,7 @@ class RespondToControllerTest < ActionController::TestCase
def test_json_with_callback_sets_javascript_content_type
@request.accept = 'application/json'
get :json_with_callback
- assert_equal 'alert(JS)', @response.body
+ assert_equal '/**/alert(JS)', @response.body
assert_equal 'text/javascript', @response.content_type
end