dbremner / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
0 stars 0 forks source link

Taint not set for matches #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Ruby.exe and RubyCompiler.exe. svn 136

def test_postmatch_taint
 str1 = "xyz"
 str1 =~ /./
 assert_equal false, $~.post_match.tainted?

 str1.taint
 str1 =~ /./
 # Fails with Ruby.exe and RubyCompiler.exe. Ok with MRI
 assert_equal true, $~.post_match.tainted?
end

def test_prematch_taint
 str1 = "xyz"
 str1 =~ /y/
 assert_equal false, $~.pre_match.tainted?

 str1.taint
 str1 =~ /y/
 # Fails with Ruby.exe and RubyCompiler.exe. Ok with MRI
 assert_equal true, $~.pre_match.tainted? 
end

Original issue reported on code.google.com by djl.rif...@googlemail.com on 22 Oct 2007 at 6:52

GoogleCodeExporter commented 8 years ago

Original comment by meaningi...@gmail.com on 23 Oct 2007 at 5:51