From 4003a5bd76ece6d5273e00bf9f468fbdcf9ce1d6 Mon Sep 17 00:00:00 2001 From: Greg Campbell Date: Wed, 9 Jul 2014 11:33:09 -0700 Subject: 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. --- actionpack/test/controller/mime/respond_to_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test/controller/mime') 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 -- cgit v1.2.3