workaround to get the unit test going

This commit is contained in:
Thomas Müller 2014-06-04 08:21:28 +02:00
parent 2c8288d8f9
commit 917f389747

View file

@ -99,12 +99,14 @@ class Hooks {
// Set legacy encryption key if it exists, to support
// depreciated encryption system
$encLegacyKey = $userView->file_get_contents('encryption.key');
if ($encLegacyKey) {
if ($userView->file_exists('encryption.key')) {
$encLegacyKey = $userView->file_get_contents('encryption.key');
if ($encLegacyKey) {
$plainLegacyKey = Crypt::legacyDecrypt($encLegacyKey, $params['password']);
$plainLegacyKey = Crypt::legacyDecrypt($encLegacyKey, $params['password']);
$session->setLegacyKey($plainLegacyKey);
$session->setLegacyKey($plainLegacyKey);
}
}
// Encrypt existing user files