[MacRuby/MacRuby] 78b9dd: String#insert will copy status of taint/untrust th...
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 78b9ddf4da3077d4194db898f0ba834049742295 https://github.com/MacRuby/MacRuby/commit/78b9ddf4da3077d4194db898f0ba834049... Author: Watson <watson1978@gmail.com> Date: 2011-04-24 (Sun, 24 Apr 2011) Changed paths: M string.c Log Message: ----------- String#insert will copy status of taint/untrust that was passed string. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "hello" str.taint str.untrust s = "foobar" s.insert(1, str) p s assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) puts :ok }}} Commit: 4db026a023d0f5716cf69a1dabc1b0901572b940 https://github.com/MacRuby/MacRuby/commit/4db026a023d0f5716cf69a1dabc1b09015... Author: Watson <watson1978@gmail.com> Date: 2011-04-24 (Sun, 24 Apr 2011) Changed paths: M string.c Log Message: ----------- String#replace will copy status of taint/untrust that was passed string. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "hello" str.taint str.untrust s = "foobar" s.replace(str) p s assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) puts :ok }}} Commit: 85aa4698f387620e2c05601be8cb989b40ad2b96 https://github.com/MacRuby/MacRuby/commit/85aa4698f387620e2c05601be8cb989b40... Author: Watson <watson1978@gmail.com> Date: 2011-04-24 (Sun, 24 Apr 2011) Changed paths: M string.c Log Message: ----------- String#{ljust, rjust, center} will copy status of taint/untrust that was passed string. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "hello" str.taint str.untrust s = "foobar".ljust(20, str) assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) s = "foobar".rjust(20, str) assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) s = "foobar".center(20, str) assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) puts :ok }}} Commit: 6e02f8577c6a291c3779ffa0782db545bba4a268 https://github.com/MacRuby/MacRuby/commit/6e02f8577c6a291c3779ffa0782db545bb... Author: Watson <watson1978@gmail.com> Date: 2011-04-24 (Sun, 24 Apr 2011) Changed paths: M string.c Log Message: ----------- String#each_char will copy status of taint/untrust that was passed string. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "hello\nworld" str.taint str.untrust str.each_char do |c| assert_equal(true, c.tainted?) assert_equal(true, c.untrusted?) end puts :ok }}} Compare: https://github.com/MacRuby/MacRuby/compare/61f1e46...6e02f85
participants (1)
-
noreply@github.com