Project

General

Profile

This project is closed and read-only.

Actions

Backport #1789

closed

TCPSocket#read returns untainted string

Backport #1789: TCPSocket#read returns untainted string

Added by tommy (Masahiro Tomita) about 17 years ago. Updated over 15 years ago.

Status:
Closed
[ruby-dev:38826]

Description

=begin
とみたです。

TCPSocket#read が untainted 文字列を返します。

$ ruby -v -rsocket -e 'p TCPSocket.new("localhost",25).read(4).tainted?'
ruby 1.9.2dev (2009-07-19 trunk 24201) [i686-linux]
false

1.8.7 では tainted です。

$ ruby -v -rsocket -e 'p TCPSocket.new("localhost",25).read(4).tainted?'
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
true

ちなみに TCPSocket#gets は tainted になります。

$ /usr/local/ruby-1.9.1/bin/ruby -v -rsocket -e 'p TCPSocket.new("localhost",25).gets.tainted?'
ruby 1.9.2dev (2009-07-19 trunk 24201) [i686-linux]
true
=end

Actions

Also available in: PDF Atom