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.
Coverage increased (+0.002%) to 99.508% when pulling 063ad770af8a81d45aa597fd0aa9f2a86bc29c29 on subdavis:bugfix/randomMaxSize into cc9139a3d3d3ffd01dc62ae1c1ac9eb112c7aae0 on keeweb:master.
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.