[rubygem-actionpack/f16] Update the patch to apply correctly and fix the test suite.
Vít Ondruch
vondruch at fedoraproject.org
Tue Aug 14 15:57:34 UTC 2012
commit 6116bcff0e9797527ab17168c740e121f76a7ff7
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Aug 14 17:57:07 2012 +0200
Update the patch to apply correctly and fix the test suite.
...4-html_escape-should-escape-single-quotes.patch | 36 +++++++++++++++-----
1 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/actionpack-3.0.17-CVE-2012-3464-html_escape-should-escape-single-quotes.patch b/actionpack-3.0.17-CVE-2012-3464-html_escape-should-escape-single-quotes.patch
index 5760d93..4d8090c 100644
--- a/actionpack-3.0.17-CVE-2012-3464-html_escape-should-escape-single-quotes.patch
+++ b/actionpack-3.0.17-CVE-2012-3464-html_escape-should-escape-single-quotes.patch
@@ -147,28 +147,46 @@ index b85e917..9b6a8bf 100644
options_for_select([ [ "<Denmark>", { :class => 'bold' } ], [ "USA", { :onclick => "alert('Hello World');" } ], [ "Sweden" ], "Germany" ])
)
end
-@@ -923,14 +923,14 @@ class FormOptionsHelperTest < ActionView::TestCase
- def test_option_html_attributes_with_multiple_element_hash
+@@ -908,15 +908,15 @@ class FormOptionsHelperTest < ActionView::TestCase
+
+ def test_option_html_attributes_from_without_hash
assert_dom_equal(
-- " class=\"fancy\" onclick=\"alert('Hello World');\"",
+- "",
+- option_html_attributes([ 'foo', 'bar' ])
+ " class=\"fancy\" onclick=\"alert('Hello World');\"",
- option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ])
++ option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ])
)
end
- def test_option_html_attributes_with_multiple_hashes
+ def test_option_html_attributes_with_single_element_hash
assert_dom_equal(
-- " class=\"fancy\" onclick=\"alert('Hello World');\"",
+- " class=\"fancy\"",
+- option_html_attributes([ 'foo', 'bar', { :class => 'fancy' } ])
+ " class=\"fancy\" onclick=\"alert('Hello World');\"",
- option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ])
++ option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ])
)
end
-
+
+@@ -921,12 +921,12 @@
+ end
+
+ def test_option_html_attributes_with_multiple_element_hash
+- assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ]).index("onclick=\"alert('Hello World');\"")
++ assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ]).index("onclick=\"alert('Hello World');\"")
+ assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ]).index("class=\"fancy\"")
+ end
+
+ def test_option_html_attributes_with_multiple_hashes
+- assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ]).index("onclick=\"alert('Hello World');\"")
++ assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ]).index("onclick=\"alert('Hello World');\"")
+ assert option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ]).index("class=\"fancy\"")
+ end
+
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 532f086..3c94c7a 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
-@@ -367,7 +367,7 @@ class FormTagHelperTest < ActionView::TestCase
+@@ -361,7 +361,7 @@ class FormTagHelperTest < ActionView::TestCase
def test_submit_tag
assert_dom_equal(
More information about the scm-commits
mailing list