mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 17:38:47 +02:00
fix export of protected notes to tar archive, fixes #432
This commit is contained in:
parent
ee58bf3d5c
commit
02eddc347a
@ -15,7 +15,7 @@ function setDataKey(decryptedDataKey) {
|
||||
}
|
||||
|
||||
function setProtectedSessionId(req) {
|
||||
cls.namespace.set('protectedSessionId', req.headers['trilium-protected-session-id']);
|
||||
cls.namespace.set('protectedSessionId', req.headers['trilium-protected-session-id'] || req.query.protectedSessionId);
|
||||
}
|
||||
|
||||
function getProtectedSessionId() {
|
||||
@ -62,7 +62,9 @@ function decryptNoteContent(noteContent) {
|
||||
}
|
||||
|
||||
try {
|
||||
noteContent.content = dataEncryptionService.decrypt(getDataKey(), noteContent.content);
|
||||
if (noteContent.content != null) {
|
||||
noteContent.content = dataEncryptionService.decrypt(getDataKey(), noteContent.content.toString());
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
e.message = `Cannot decrypt note content for noteContentId=${noteContent.noteContentId}: ` + e.message;
|
||||
|
Loading…
x
Reference in New Issue
Block a user