Skip to content

Commit

Permalink
[bug] Fix crash in commandSetPassword after fix of 70466; fix bug 70864
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Oct 12, 2024
1 parent 199e8f9 commit b2ea17e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions DocService/sources/canvasservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,11 @@ function* commandSetPassword(ctx, conn, cmd, outputData) {
let documentPasswordCurEnc = sqlBase.DocumentPassword.prototype.getCurPassword(ctx, row.password);
if (documentPasswordCurEnc) {
hasDocumentPassword = true;
const passwordCurPlain = yield utils.decryptPassword(ctx, documentPasswordCurEnc);
const passwordPlain = yield utils.decryptPassword(ctx, cmd.getPassword());
isDocumentPasswordModified = passwordCurPlain !== passwordPlain;
if (cmd.getPassword()) {
const passwordCurPlain = yield utils.decryptPassword(ctx, documentPasswordCurEnc);
const passwordPlain = yield utils.decryptPassword(ctx, cmd.getPassword());
isDocumentPasswordModified = passwordCurPlain !== passwordPlain;
}
}
}
}
Expand Down

0 comments on commit b2ea17e

Please sign in to comment.