diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2016-09-24 10:28:06 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2016-09-24 10:31:23 -0700 |
| commit | 9ce482da3960ee43decee41fba53b78c12c3e52c (patch) | |
| tree | f7e77a4a2154a3f259fc41f5c2282a752e4ba200 /rt/t/api | |
| parent | 6894828ab5a66e53ad6945cc14e6cd9f9c3b67f7 (diff) | |
rt 4.2.13 ticket#13852
Diffstat (limited to 'rt/t/api')
| -rw-r--r-- | rt/t/api/password-types.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rt/t/api/password-types.t b/rt/t/api/password-types.t index 9eeded499..3278b488d 100644 --- a/rt/t/api/password-types.t +++ b/rt/t/api/password-types.t @@ -16,11 +16,12 @@ ok($root->IsPassword("password")); is($root->__Value("Password"), $old, "Unchanged after password check"); # bcrypt (smaller number of rounds) +my $rounds = RT->Config->Get("BcryptCost"); my $salt = Crypt::Eksblowfish::Bcrypt::en_base64("a"x16); $root->_Set( Field => "Password", Value => RT::User->_GeneratePassword_bcrypt("smaller", 6, $salt) ); like($root->__Value("Password"), qr/^\!$default\!06\!/, "Stored with a smaller number of rounds"); ok($root->IsPassword("smaller"), "Smaller number of bcrypt rounds works"); -like($root->__Value("Password"), qr/^\!$default\!10\!/, "And is now upgraded to salted $default"); +like($root->__Value("Password"), qr/^\!$default\!$rounds\!/, "And is now upgraded to $rounds rounds"); # Salted SHA-512, one round $root->_Set( Field => "Password", Value => RT::User->_GeneratePassword_sha512("other", "salt") ); |
