Project

General

Profile

Bug #11767

Range#to_s and Range#inspect are not infected by the receiver

Added by nobu (Nobuyoshi Nakada) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:71811]

Description

In general, to_s and inspect on a tainted object should result a tainted string.
Range seems the only exception.

code

p ("0".taint.."1").to_s.tainted?
p ("0".."1".taint).to_s.tainted?
p ("0".."1").taint.to_s.tainted?

expected result

prints true 3 times.

actual result

prints true, true, and false.

Associated revisions

Revision f7fb4e00
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

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

Revision 52868
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

Revision 52868
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

Revision 52868
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

Revision 52868
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

Revision 52868
Added by nobu (Nobuyoshi Nakada) over 3 years ago

range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

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

merge revision(s) 52868: [Backport #11767]

    * range.c (range_to_s): should be infected by the receiver.
      str2 infects by appending.  [ruby-core:71811] [Bug #11767]

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

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

merge revision(s) 52868: [Backport #11767]

* range.c (range_to_s): should be infected by the receiver.
  str2 infects by appending.  [ruby-core:71811] [Bug #11767]

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

merge revision(s) 52868: [Backport #11767]

    * range.c (range_to_s): should be infected by the receiver.
      str2 infects by appending.  [ruby-core:71811] [Bug #11767]

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

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

merge revision(s) 52868: [Backport #11767]

* range.c (range_to_s): should be infected by the receiver.
  str2 infects by appending.  [ruby-core:71811] [Bug #11767]

History

#1

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset r52868.


range.c: infected by the receiver

  • range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767]

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

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

Backported into ruby_2_2 branch at r52873.

Updated by usa (Usaku NAKAMURA) over 3 years ago

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

ruby_2_1 r52875 merged revision(s) 52868.

Also available in: Atom PDF