A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: do not allow non-string ETag header in attachments upload
Abdullah Attab52cc0c590c9
diff --git a/apps/web/src/interfaces/fs.js b/apps/web/src/interfaces/fs.jsindex e2875b04c..b1fca7ea7 100644--- a/apps/web/src/interfaces/fs.js+++ b/apps/web/src/interfaces/fs.js@@ -259,8 +259,10 @@ async function uploadFile(filename, requestOptions) {throw new S3Error(`Failed to upload part at offset ${i}`, e);});- if (!response.headers.etag)- throw new Error(`Failed to upload part at offset ${i}: no etag found.`);+ if (!response.headers.etag || typeof response.headers.etag !== "string")+ throw new Error(+ `Failed to upload part at offset ${i}: invalid etag. ETag: ${response.headers.etag}`+ );uploadedBytes += blob.size;uploadedChunks.push({