mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
minor: use of let instead of var
- To avoid some secrets to live outside their intended scope.
This commit is contained in:
parent
727c9d7b88
commit
750635db4e
@ -266,9 +266,9 @@ define([
|
||||
}
|
||||
|
||||
if (content.password) {
|
||||
var uHash = ctx.store.data.blockHash;
|
||||
var uSecret = Block.parseBlockHash(uHash);
|
||||
var key = uSecret.keys.symmetric;
|
||||
let uHash = ctx.store.data.blockHash;
|
||||
let uSecret = Block.parseBlockHash(uHash);
|
||||
let key = uSecret.keys.symmetric;
|
||||
content.password = Crypto.encrypt(content.password, key);
|
||||
}
|
||||
|
||||
@ -387,9 +387,9 @@ define([
|
||||
var channel = content.channel || content.teamChannel;
|
||||
|
||||
if (content.password) {
|
||||
var uHash = ctx.store.data.blockHash;
|
||||
var uSecret = Block.parseBlockHash(uHash);
|
||||
var key = uSecret.keys.symmetric;
|
||||
let uHash = ctx.store.data.blockHash;
|
||||
let uSecret = Block.parseBlockHash(uHash);
|
||||
let key = uSecret.keys.symmetric;
|
||||
content.pw = content.password;
|
||||
content.password = Crypto.encrypt(content.password, key);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user