From 6d0526db91afb0675c2ad3d871529d1536303c64 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 8 Aug 2012 15:10:35 -0700 Subject: escape select_tag :prompt values CVE-2012-3463 --- actionpack/test/template/form_tag_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 68dfceef07..6f0d0c3561 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -208,6 +208,12 @@ class FormTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end + def test_select_tag_escapes_prompt + actual = select_tag "places", "".html_safe, :prompt => "" + expected = %() + assert_dom_equal expected, actual + end + def test_select_tag_with_prompt_and_include_blank actual = select_tag "places", "".html_safe, :prompt => "string", :include_blank => true expected = %() -- cgit v1.2.3