fix: possible missing path properties in /sign

When /sign is called with UIDs instead of paths, it is possible to get a
response without 'path' properties present in "signed fs item" objects.
This commit addresses the issue by fetching paths from FS node objects
as a last resort.
This commit is contained in:
KernelDeimos
2025-08-29 16:08:17 -04:00
parent d4674d7ddd
commit d1b4458c74
+1 -1
View File
@@ -151,7 +151,7 @@ module.exports = eggspress('/sign', {
// sign
try{
let signature = await sign_file(node.entry, item.action)
signature.path = signature.path ?? item.path;
signature.path = signature.path ?? item.path ?? await node.get('path');
signatures.push(signature);
}
catch(e){