Project

General

Profile

Bug #11834

Backport r53168, r53169 (String#scrub, #encode infection)

Added by nagachika (Tomoyuki Chikanaga) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-dev:49444]

Description

このチケットはバックポート管理用です。

r53168, r53169 の修正は 2.1, 2.2 でも必要そうです。

Associated revisions

Revision 5ad41fa1
Added by nagachika (Tomoyuki Chikanaga) over 3 years ago

merge revision(s) 49096,51353,53168,53169: [Backport #11834]

    test_m17n.rb: split test_scrub

    * test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some

tests.
* include/ruby/ruby.h: add raw FL macros, which assume always the
argument object is not a special constant.

    * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.

    * string.c: deal with taint flags directly across String instances.

    * transcode.c (rb_econv_substr_append, econv_primitive_convert):
      the result should be infected by the original string.

    * string.c (rb_str_scrub): the result should be infected by the
      original string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@53825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 53825
Added by nagachika (Tomoyuki Chikanaga) over 3 years ago

merge revision(s) 49096,51353,53168,53169: [Backport #11834]

test_m17n.rb: split test_scrub

* test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some

tests.
* include/ruby/ruby.h: add raw FL macros, which assume always the
argument object is not a special constant.

* internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.

* string.c: deal with taint flags directly across String instances.

* transcode.c (rb_econv_substr_append, econv_primitive_convert):
  the result should be infected by the original string.

* string.c (rb_str_scrub): the result should be infected by the
  original string.

Revision 2703953c
Added by usa (Usaku NAKAMURA) over 3 years ago

merge revision(s) 49096,51353,53168,53169: [Backport #11834]

    test_m17n.rb: split test_scrub

    * test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some

tests.
* include/ruby/ruby.h: add raw FL macros, which assume always the
argument object is not a special constant.

    * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.

    * string.c: deal with taint flags directly across String instances.

    * transcode.c (rb_econv_substr_append, econv_primitive_convert):
      the result should be infected by the original string.

    * string.c (rb_str_scrub): the result should be infected by the
      original string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@54260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 54260
Added by usa (Usaku NAKAMURA) over 3 years ago

merge revision(s) 49096,51353,53168,53169: [Backport #11834]

test_m17n.rb: split test_scrub

* test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some

tests.
* include/ruby/ruby.h: add raw FL macros, which assume always the
argument object is not a special constant.

* internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING.

* string.c: deal with taint flags directly across String instances.

* transcode.c (rb_econv_substr_append, econv_primitive_convert):
  the result should be infected by the original string.

* string.c (rb_str_scrub): the result should be infected by the
  original string.

History

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE

r49096, r51353, r53168 and r53169 were backported into ruby_2_2 branch at r53825.

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE to 2.0.0: UNKNOWN, 2.1: DONE, 2.2: DONE

ruby_2_1 r54260 merged revision(s) 49096,51353,53168,53169.

Also available in: Atom PDF