diff options
author | Go MAEDA <maeda@farend.jp> | 2018-12-17 04:49:08 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-12-17 04:49:08 +0000 |
commit | 4f96d8f832d5db64ccb61d97e7f1e3a2e0fd4eb9 (patch) | |
tree | 0d1cc99f882870bea8bf83e57f1bf346a1bc51d9 | |
parent | 306752c997b7541c3153075f2c06c9adda67e2fb (diff) | |
download | redmine-4f96d8f832d5db64ccb61d97e7f1e3a2e0fd4eb9.tar.gz redmine-4f96d8f832d5db64ccb61d97e7f1e3a2e0fd4eb9.zip |
Decrypting LDAP and SCM passwords fail if the plaintext password is longer than 31 bytes (#30171).
Patch by Nik Il.
git-svn-id: http://svn.redmine.org/redmine/trunk@17763 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/ciphering.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/ciphering.rb b/lib/redmine/ciphering.rb index 61f309b40..ad30e035f 100644 --- a/lib/redmine/ciphering.rb +++ b/lib/redmine/ciphering.rb @@ -33,7 +33,7 @@ module Redmine c.iv = iv e = c.update(text.to_s) e << c.final - "aes-256-cbc:" + [e, iv].map {|v| Base64.encode64(v).strip}.join('--') + "aes-256-cbc:" + [e, iv].map {|v| Base64.strict_encode64(v)}.join('--') end end |