mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
Use the correct password when sharing a pad to a contact
- Fix #1270; - Force reload option added.
This commit is contained in:
parent
da63f7d51e
commit
1ac0cd3e1d
@ -2619,7 +2619,8 @@ define([
|
||||
disableCache: localStorage['CRYPTPAD_STORE|disableCache'],
|
||||
driveEvents: !rdyCfg.noDrive, //rdyCfg.driveEvents // Boolean
|
||||
lastVisit: Number(localStorage.lastVisit) || undefined,
|
||||
blockId: blockId
|
||||
blockId: blockId,
|
||||
blockHash: blockHash
|
||||
};
|
||||
common.userHash = userHash || LocalStore.getUserHash();
|
||||
|
||||
|
||||
@ -129,6 +129,7 @@ define([
|
||||
var obj = {
|
||||
p: msg.content.isTemplate ? ['template'] : undefined,
|
||||
t: teamNotification || undefined,
|
||||
f: 1,
|
||||
pw: msg.content.password || ''
|
||||
};
|
||||
common.openURL(Hash.getNewPadURL(msg.content.href, obj));
|
||||
|
||||
@ -8,7 +8,8 @@ define([
|
||||
'/common/common-hash.js',
|
||||
'/common/common-util.js',
|
||||
'/components/chainpad-crypto/crypto.js',
|
||||
], function (ApiConfig, Messaging, Hash, Util, Crypto) {
|
||||
'/common/outer/login-block.js',
|
||||
], function (ApiConfig, Messaging, Hash, Util, Crypto, Block) {
|
||||
|
||||
// Random timeout between 10 and 30 times your sync time (lag + chainpad sync)
|
||||
var getRandomTimeout = function (ctx) {
|
||||
@ -265,7 +266,9 @@ define([
|
||||
}
|
||||
|
||||
if (content.password) {
|
||||
var key = ctx.store.driveSecret.keys.cryptKey;
|
||||
var uHash = ctx.store.data.blockHash;
|
||||
var uSecret = Block.parseBlockHash(uHash);
|
||||
var key = uSecret.keys.symmetric;
|
||||
content.password = Crypto.encrypt(content.password, key);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user