Nextcloud session['snappymail-password'] to session['snappymail-passphrase']

This commit is contained in:
the-djmaze 2024-03-14 03:59:46 +01:00
parent d784c61076
commit 106765e384
3 changed files with 20 additions and 9 deletions

View file

@ -250,8 +250,13 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
$aResult['ContactsSync']['User'] = $sUID;
$bSave = true;
}
if (empty($aResult['ContactsSync']['Password'])) {
$aResult['ContactsSync']['Password'] = '';
$pass = \OC::$server->getSession()['snappymail-passphrase'];
if ($pass/* && empty($aResult['ContactsSync']['Password'])*/) {
$pass = \SnappyMail\Crypt::DecryptUrlSafe($pass, $sUID);
if ($pass) {
$aResult['ContactsSync']['Password'] = $pass;
$bSave = true;
}
}
if ($bSave) {
$oActions = \RainLoop\Api::Actions();