mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-20 20:26:21 +00:00
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:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user