diff options
Diffstat (limited to 'spec/ruby/core/string/crypt_spec.rb')
-rw-r--r-- | spec/ruby/core/string/crypt_spec.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/ruby/core/string/crypt_spec.rb b/spec/ruby/core/string/crypt_spec.rb index b947702492..06f84c70a4 100644 --- a/spec/ruby/core/string/crypt_spec.rb +++ b/spec/ruby/core/string/crypt_spec.rb @@ -25,21 +25,6 @@ describe "String#crypt" do "mypassword".crypt(obj).should == "$2a$04$0WVaz0pV3jzfZ5G5tpmHWuBQGbkjzgtSc3gJbmdy0GAGMa45MFM2." end - ruby_version_is ''...'2.7' do - it "taints the result if either salt or self is tainted" do - tainted_salt = "$2a$04$0WVaz0pV3jzfZ5G5tpmHWu" - tainted_str = "mypassword" - - tainted_salt.taint - tainted_str.taint - - "mypassword".crypt("$2a$04$0WVaz0pV3jzfZ5G5tpmHWu").should_not.tainted? - tainted_str.crypt("$2a$04$0WVaz0pV3jzfZ5G5tpmHWu").should.tainted? - "mypassword".crypt(tainted_salt).should.tainted? - tainted_str.crypt(tainted_salt).should.tainted? - end - end - it "doesn't return subclass instances" do StringSpecs::MyString.new("mypassword").crypt("$2a$04$0WVaz0pV3jzfZ5G5tpmHWu").should be_an_instance_of(String) "mypassword".crypt(StringSpecs::MyString.new("$2a$04$0WVaz0pV3jzfZ5G5tpmHWu")).should be_an_instance_of(String) @@ -85,21 +70,6 @@ describe "String#crypt" do "".crypt(obj).should == "aaQSqAReePlq6" end - ruby_version_is ''...'2.7' do - it "taints the result if either salt or self is tainted" do - tainted_salt = "aa" - tainted_str = "hello" - - tainted_salt.taint - tainted_str.taint - - "hello".crypt("aa").should_not.tainted? - tainted_str.crypt("aa").should.tainted? - "hello".crypt(tainted_salt).should.tainted? - tainted_str.crypt(tainted_salt).should.tainted? - end - end - it "doesn't return subclass instances" do StringSpecs::MyString.new("hello").crypt("aa").should be_an_instance_of(String) "hello".crypt(StringSpecs::MyString.new("aa")).should be_an_instance_of(String) |