transcend-io / penumbra

Encrypt/decrypt anything in the browser using streams on background threads.
https://penumbra-example.vercel.app/
Apache License 2.0
146 stars 20 forks source link

Fix potential race condition with `PenumbraZipWriter.close()` #227

Closed eligrey closed 2 years ago

eligrey commented 2 years ago

It appears that PenumbraZipWriter.close() might not wait for all writes to finish. I tweaked the function to explicitly await on this.getSize() before this.writer.close() is called.

I think this hasn't caused issues yet because we aren't awaiting this.writer.close() (intentional)

Related Issues

Public Changelog

[none]

Security Implications

[none]

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
penumbra-example ✅ Ready (Inspect) Visit Preview Jun 15, 2022 at 11:34PM (UTC)