mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix(linked-doc): ignore invalid files
This commit is contained in:
parent
f3f06d833b
commit
c1b8f87e02
@ -674,6 +674,7 @@ const factory = (Sortify, UserObject, ProxyManager,
|
||||
let l = pws.length;
|
||||
|
||||
const parsed = Hash.parsePadUrl(href);
|
||||
if (!parsed?.hash) { return cb(); } // We cannot fixed it anyhow
|
||||
const check = password => {
|
||||
opts.password = password;
|
||||
Cryptget.get(parsed.hash, (err, contentStr) => {
|
||||
@ -682,6 +683,7 @@ const factory = (Sortify, UserObject, ProxyManager,
|
||||
return check(pws[i++]);
|
||||
}
|
||||
const content = Util.tryParse(contentStr)?.content;
|
||||
if (!content) { return cb(); } // Same as above: we can’t read the content
|
||||
const secret = Hash.getSecrets('pad', parsed.hash, password);
|
||||
|
||||
// Compute expected JSON
|
||||
|
||||
2
www/common/worker.bundle.min.js
vendored
2
www/common/worker.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user