mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 07:34:09 +01:00
* [ADD] New encryption schema by using Defuse/php-encryption library. WARNING: work in progress
This commit is contained in:
@@ -55,6 +55,8 @@ class AccountCrypt
|
||||
*/
|
||||
public function updateOldPass(&$currentMasterPass)
|
||||
{
|
||||
set_time_limit(300);
|
||||
|
||||
$accountsOk = [];
|
||||
$userId = Session::getUserData()->getUserId();
|
||||
$demoEnabled = Checks::demoIsEnabled();
|
||||
|
||||
@@ -55,6 +55,8 @@ class AccountHistoryCrypt
|
||||
*/
|
||||
public function updateOldPass(&$currentMasterPass)
|
||||
{
|
||||
set_time_limit(300);
|
||||
|
||||
$accountsOk = [];
|
||||
$demoEnabled = Checks::demoIsEnabled();
|
||||
$errorCount = 0;
|
||||
|
||||
@@ -51,18 +51,26 @@ class Crypt
|
||||
public static function migrate(&$masterPass)
|
||||
{
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
if (!DB::beginTransaction()) {
|
||||
throw new SPException(SPException::SP_ERROR, __('No es posible iniciar una transacción', false));
|
||||
}
|
||||
|
||||
self::migrateAccounts($masterPass);
|
||||
self::migrateCustomFields($masterPass);
|
||||
|
||||
DB::endTransaction();
|
||||
if (!DB::endTransaction()) {
|
||||
throw new SPException(SPException::SP_ERROR, __('No es posible finalizar una transacción', false));
|
||||
}
|
||||
} catch (CryptoException $e) {
|
||||
DB::rollbackTransaction();
|
||||
if (DB::rollbackTransaction()) {
|
||||
debugLog('Rollback');
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (SPException $e) {
|
||||
DB::rollbackTransaction();
|
||||
if (DB::rollbackTransaction()) {
|
||||
debugLog('Rollback');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -226,8 +226,8 @@ class Upgrade
|
||||
return $dbResult === true
|
||||
&& is_object($UserData)
|
||||
&& !empty($masterPass)
|
||||
&& Crypt::migrateHash($masterPass)
|
||||
&& Crypt::migrate($masterPass)
|
||||
&& Crypt::migrateHash($masterPass)
|
||||
&& UserMigrate::setMigrateUsers();
|
||||
}
|
||||
} catch (SPException $e) {
|
||||
|
||||
Reference in New Issue
Block a user