Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "always taints resulting strings when self or regexp is tainted" do
- strs = ["hello world"]
- strs += strs.map { |s| s.dup.taint }
- strs.each do |str|
- str = str.dup
- str.slice!(//, 0).tainted?.should == str.tainted?
- str.slice!(/hello/, 0).tainted?.should == str.tainted?
- tainted_re = /(.)(.)(.)/
- tainted_re.taint
- str.slice!(tainted_re, 1).tainted?.should == true
- end
- end
Add Comment
Please, Sign In to add comment