mirror of
https://github.com/redmine/redmine.git
synced 2026-03-26 14:20:52 +01:00
Merged r17764 from trunk to 4.0-stable (#30171).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17766 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,8 +21,9 @@ class Redmine::CipheringTest < ActiveSupport::TestCase
|
||||
|
||||
def test_password_should_be_encrypted
|
||||
Redmine::Configuration.with 'database_cipher_key' => 'secret' do
|
||||
r = Repository::Subversion.create!(:password => 'foo', :url => 'file:///tmp', :identifier => 'svn')
|
||||
assert_equal 'foo', r.password
|
||||
plaintext_password = "THIS_IS_A_32_BYTES_LONG_PASSWORD"
|
||||
r = Repository::Subversion.create!(:password => plaintext_password, :url => 'file:///tmp', :identifier => 'svn')
|
||||
assert_equal plaintext_password, r.password
|
||||
assert r.read_attribute(:password).match(/\Aaes-256-cbc:.+\Z/)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user