From: Joseph Jones Date: 2015-12-17T21:05:42-07:00 Subject: [ruby-core:72239] [Ruby trunk - Bug #11760] [Open] Encoding is tainted unexpectedly by Marshal.load --56738616_625558ec_16c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joseph Jones liked your message with Boxer. On December 1, 2015 at 23:26:= 20 MST, nobu=40ruby-lang.org wrote:Issue =2311760 has been reported by No= buyoshi Nakada.----------------------------------------Bug =2311760: Enco= ding is tainted unexpectedly by Marshal.loadhttps://bugs.ruby-lang.org/is= sues/11760* Author: Nobuyoshi Nakada* Status: Open* Priority: Normal* Ass= ignee: * ruby -v: r52850* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: = REQUIRED----------------------------------------By =60Marshal.load=60ing = tainted source, =60Encoding=60 object will be tainted.=23=23 code to repr= oduce=7E=7E=7Erubye =3D Encoding::UT=46=5F8p e.tainted=3Fp e =3D=3D Marsh= al.load(Marshal.dump(e).taint)p e.tainted=3F=7E=7E=7E=23=23 expected resu= lts=60false=60, =60true=60, and =60false=60=23=23 actual results=60false=60= , =60true=60, and =60true=60-- https://bugs.ruby-lang.org/ --56738616_625558ec_16c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Joseph Jones liked your message with Boxer.


= On December 1, 2015 at 23:26:20 MST, nobu=40ruby-lang.org wrote:
Issue =2311760 has been report= ed by Nobuyoshi Nakada.

--------------------------------------= --
Bug =2311760: Encoding is tainted unexpectedly by Marshal.loadhttps://bugs.ruby-lang.org/issues/11760

* Author: Nobuyoshi= Nakada
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: r52850
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2:= REQUIRED
----------------------------------------
By =60Marsha= l.load=60ing tainted source, =60Encoding=60 object will be tainted.
=
=23=23 code to reproduce
=7E=7E=7Eruby
e =3D Encoding::UT= =46=5F8
p e.tainted=3F
p e =3D=3D Marshal.load(Marshal.dump(e).= taint)
p e.tainted=3F
=7E=7E=7E

=23=23 expected resu= lts
=60false=60, =60true=60, and =60false=60

=23=23 actua= l results
=60false=60, =60true=60, and =60true=60


<= br />
--
https://bugs.ruby-lang.org/
<= /div> --56738616_625558ec_16c--