Bug 227810 - [WebCrypto] deriveBits() incorrectly throws for PBKDF2 algorithm when the password is empty
Summary: [WebCrypto] deriveBits() incorrectly throws for PBKDF2 algorithm when the pas...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-08 12:43 PDT by Chris Dumez
Modified: 2021-07-09 10:34 PDT (History)
10 users (show)

See Also:


Attachments
Patch (962.34 KB, patch)
2021-07-08 12:48 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-07-08 12:43:29 PDT
deriveBits() incorrectly throws for PBKDF2 algorithm when the password is empty.

This is causing Safari to fail subtests in the following WPT test:
- https://wpt.live/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.html?5001-6000

Empty passwords are supported by both Chrome and Firefox.
Comment 1 Chris Dumez 2021-07-08 12:48:51 PDT
Created attachment 433155 [details]
Patch
Comment 2 Chris Dumez 2021-07-09 09:14:15 PDT
I know the patch is over 900k but the code change is actually 3 lines. The rest is tests rebaselines as this causes a LOT of subtests to start passing :)
Comment 3 Yusuke Suzuki 2021-07-09 09:56:55 PDT
Comment on attachment 433155 [details]
Patch

r=me
Comment 4 EWS 2021-07-09 10:33:02 PDT
Committed r279788 (239555@main): <https://commits.webkit.org/239555@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433155 [details].
Comment 5 Radar WebKit Bug Importer 2021-07-09 10:34:19 PDT
<rdar://problem/80383544>