Now the MainAccount CryptKey is sealed.

This way change-password extension, Oauth2 and others can easily change the cryptkey seal withoug loosing decrypt functionality
This commit is contained in:
the-djmaze 2024-03-17 14:53:45 +01:00
parent 8c033f53fa
commit 9ccd616132
3 changed files with 20 additions and 32 deletions

View file

@ -201,6 +201,7 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
$oAccount->SetPassword($oNewPassword);
if ($oAccount instanceof \RainLoop\Model\MainAccount) {
$oActions->SetAuthToken($oAccount);
$oAccount->resealCryptKey($oPrevPassword);
}
return $this->jsonResponse(__FUNCTION__, $oActions->AppData(false));