fix(linked-doc): ignore invalid files

This commit is contained in:
Fabrice Mouhartem 2026-08-13 16:19:45 +02:00
parent f3f06d833b
commit c1b8f87e02
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -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 cant read the content
const secret = Hash.getSecrets('pad', parsed.hash, password);
// Compute expected JSON

File diff suppressed because one or more lines are too long