mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-25 22:29:25 -05:00
server side encryption WIP
This commit is contained in:
@@ -7,7 +7,9 @@ function setDataKey(req, decryptedDataKey) {
|
||||
return req.session.protectedSessionId;
|
||||
}
|
||||
|
||||
function getDataKey(req, protectedSessionId) {
|
||||
function getDataKey(req) {
|
||||
const protectedSessionId = req.headers['x-protected-session-id'];
|
||||
|
||||
if (protectedSessionId && req.session.protectedSessionId === protectedSessionId) {
|
||||
return req.session.decryptedDataKey;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user