π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
More asserts
Manav Rathi99d25e4bb5b7
diff --git a/web/packages/gallery/services/upload/upload-service.ts b/web/packages/gallery/services/upload/upload-service.tsindex 4abf8df0e2..628fcae463 100644--- a/web/packages/gallery/services/upload/upload-service.ts+++ b/web/packages/gallery/services/upload/upload-service.ts@@ -1548,9 +1548,16 @@ const encryptFileStream = async (const ref = { pullCount: 1 };const encryptedFileStream = new ReadableStream({async pull(controller) {- const { value } = await fileStreamReader.read();+ const { value, done } = await fileStreamReader.read();+ if (done) {+ // TransformStream in readUploadItem guarantees that we'll get+ // encryption sized `chunkCount` chunks. Below we close the+ // controller on the last chunk. So we shouldn't be getting a+ // `done` here.+ controller.close();+ throw new Error("Unexpected stream state");+ }const encryptedFileChunk = await worker.encryptStreamChunk(- // @ts-ignorevalue,pushState,ref.pullCount === chunkCount,