Closed
Bug 1286880
Opened 9 years ago
Closed 5 years ago
crypto.subtle.deriveBits throws wrong error for null length result
Categories
(Core :: Security: PSM, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla80
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: bugzilla, Assigned: rmf)
References
Details
(Whiteboard: [psm-backlog])
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160711004013
Steps to reproduce:
Run the following code in the JavaScript console:
crypto.subtle.importKey("raw", new Uint8Array([1, 2, 3]), {name: "PBKDF2"}, false, ["deriveKey", "deriveBits"])
.then(function(baseKey) {
crypto.subtle.deriveBits({name: "PBKDF2", salt: new Uint8Array([1]), hash: "SHA-256", iterations: 1}, baseKey, null)
.then(function(key) {console.log("Derivation succeeded.");})
.catch(function(err) {console.log("Error " + err.name);});
});
Actual results:
It displays "Error DataError".
Expected results:
It should have displayed "Error OperationError".
The same error occurs with deriveKey. See step 1 of operation Derive bits at https://w3c.github.io/webcrypto/Overview.html#pbkdf2-operations.
Updated•9 years ago
|
Component: Untriaged → Security
Product: Firefox → Core
Updated•9 years ago
|
Component: Security → DOM: Security
Updated•9 years ago
|
Component: DOM: Security → Security
![]() |
||
Updated•9 years ago
|
Component: Security → Security: PSM
Priority: -- → P3
Whiteboard: [psm-backlog]
Assignee | ||
Comment 1•5 years ago
|
||
Depends on D79455
Updated•5 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D80009
Updated•5 years ago
|
Attachment #9156299 -
Attachment is obsolete: true
Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de7c4515c92e
add test to ensure deriveBits and deriveKey throw the correct errors given invalid length arguments r=keeler
Comment 4•5 years ago
|
||
Backed out for perma failures.
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8e5e772e71a
add test to ensure deriveBits and deriveKey throw the correct errors given invalid length arguments r=keeler
Comment 6•5 years ago
|
||
bugherder |
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
status-firefox80:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in
before you can comment on or make changes to this bug.
Description
•