keeweb / kdbxweb

Web Kdbx library
https://app.keeweb.info
MIT License
413 stars 57 forks source link

Update randomness generator with iterative method #22

Closed subdavis closed 6 years ago

subdavis commented 6 years ago

screenshot_20180711_221425

In subdavis/Tusk#186 a user discovered behavior where attachments larger than 65536 bytes caused an error when using KDBXv4. I confirmed the same behavior in KeeWeb. This makes sense since protected attachments get a salt generated, and according to the SubtleCrypto docs, getRandomBytes cannot produce more than 65535 at a time.

This fixes that bug and adds a new test for it.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.002%) to 99.508% when pulling 063ad770af8a81d45aa597fd0aa9f2a86bc29c29 on subdavis:bugfix/randomMaxSize into cc9139a3d3d3ffd01dc62ae1c1ac9eb112c7aae0 on keeweb:master.

antelle commented 6 years ago

Thanks a lot! 🎁 This fixes keeweb/keeweb#922

antelle commented 6 years ago

Published v1.2.4