diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-29 19:47:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-29 19:47:51 +0000 |
commit | fd24250be09e54fcbfaff1ab524f2d9796835299 (patch) | |
tree | b8f2b93e1cf78279d4133d8274935447765f6dc5 /test | |
parent | d92c204ed3899d775e4f47d79e3fec91e44ae2c3 (diff) | |
download | redmine-fd24250be09e54fcbfaff1ab524f2d9796835299.tar.gz redmine-fd24250be09e54fcbfaff1ab524f2d9796835299.zip |
Fixed: crypting blank passwords raises an error (#9137).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7985 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/ciphering_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/ciphering_test.rb b/test/unit/lib/redmine/ciphering_test.rb index 6c0e0e368..94d40116e 100644 --- a/test/unit/lib/redmine/ciphering_test.rb +++ b/test/unit/lib/redmine/ciphering_test.rb @@ -43,6 +43,14 @@ class Redmine::CipheringTest < ActiveSupport::TestCase end end + def test_blank_password_should_be_clear + Redmine::Configuration.with 'database_cipher_key' => 'secret' do + r = Repository::Subversion.generate!(:password => '') + assert_equal '', r.password + assert_equal '', r.read_attribute(:password) + end + end + def test_unciphered_password_should_be_readable Redmine::Configuration.with 'database_cipher_key' => nil do r = Repository::Subversion.generate!(:password => 'clear') |