π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Limit filename-derived temporary extensions
Neeraj Gupta15d6ca5a379f
diff --git a/desktop/src/main/utils/temp.ts b/desktop/src/main/utils/temp.tsindex 229d8a958e..82f1398cf5 100644--- a/desktop/src/main/utils/temp.ts+++ b/desktop/src/main/utils/temp.ts@@ -20,7 +20,8 @@ const randomPrefix = () => {return Array(10).fill("").map(randomChar).join("");};-const isValidExtension = (extension: string) => /^[a-z0-9]+$/i.test(extension);+const isValidExtension = (extension: string) =>+ /^[a-z0-9]{1,244}$/i.test(extension);export const makeTempFilePath = async (extension?: string) => {if (extension && !isValidExtension(extension))diff --git a/web/packages/gallery/services/convert-core.ts b/web/packages/gallery/services/convert-core.tsindex 971f7ad0f9..12fee78fb4 100644--- a/web/packages/gallery/services/convert-core.ts+++ b/web/packages/gallery/services/convert-core.ts@@ -31,7 +31,7 @@ export const renderableImageBlobWeb = async (lowercaseExtension(fileName) ?? "";const inputExtension =extension === "tif" &&- /^[a-z0-9]+$/.test(fileNameExtension)+ /^[a-z0-9]{1,244}$/.test(fileNameExtension)? fileNameExtension: extension;return await opts.convertToJPEG(imageBlob, inputExtension);