[BUGFIX] Empty passwords throw warning
authorAndreas Wolf <andreas.wolf@typo3.org>
Tue, 24 Apr 2012 08:32:48 +0000 (10:32 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Tue, 24 Apr 2012 08:34:14 +0000 (10:34 +0200)
commit14cb47f9f673ac2c69f56313e9aa8bc8fdbe7f14
tree28bc24a023d5bda8099f5b881176ee41d4cedfe6
parentfa99ec783583dbe68b81a027763818723ded383c
[BUGFIX] Empty passwords throw warning

Empty passwords were encrypted by our helper methods, but lead to the
fourth part of the encrypted string (the actual password) being empty.
This made the decryption method struggle, which is now fixed by just
returning an empty string when encrypting an empty password (this case
is considered in the decryption routine already).

Additionally, this commit adds a unit test for the encryption class.
Classes/Backend/TceMainHook.php
Classes/Utility/Encryption.php
Tests/Utility/EncryptionTest.php [new file with mode: 0644]