mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Fix suggested names for saved attachments
This commit is contained in:
@@ -267,7 +267,11 @@ export const saveAttachmentToDisk = async ({
|
||||
}
|
||||
filePath = dialogFilePath;
|
||||
} else {
|
||||
filePath = join(baseDir, name);
|
||||
filePath = join(baseDir, basename(name));
|
||||
|
||||
if (!isPathInside(filePath, baseDir)) {
|
||||
throw new Error('Invalid attachment path');
|
||||
}
|
||||
}
|
||||
|
||||
await writeWithAttributes(filePath, data);
|
||||
|
||||
Reference in New Issue
Block a user