mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
separate DB connection for each transaction (just for the record, will be reverted probably)
This commit is contained in:
@@ -17,10 +17,10 @@ async function changePassword(currentPassword, newPassword, req) {
|
||||
const newPasswordVerificationKey = utils.toBase64(await my_scrypt.getVerificationHash(newPassword));
|
||||
const decryptedDataKey = await password_encryption.getDataKey(currentPassword);
|
||||
|
||||
await sql.doInTransaction(async () => {
|
||||
await password_encryption.setDataKey(newPassword, decryptedDataKey);
|
||||
await sql.doInTransaction(async db => {
|
||||
await password_encryption.setDataKey(db, newPassword, decryptedDataKey);
|
||||
|
||||
await options.setOption('password_verification_hash', newPasswordVerificationKey);
|
||||
await options.setOption(db, 'password_verification_hash', newPasswordVerificationKey);
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user