[WebAuth] Return ArrayBuffer instead of UInt8Array

RESOLVED FIXED in Firefox 58

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mwobensmith, Assigned: jcj)

Tracking

(Blocks: 1 bug)

57 Branch
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 wontfix, firefox58 fixed)

Details

Attachments

(1 attachment)

As surfaced in interop testing, we should return objects of type ArrayBuffer instead of UInt8Array objects.

This will require modification of existing tests as well.
Comment hidden (mozreview-request)
Comment on attachment 8913433 [details]
Bug 1401803 - WebAuthn types need to return ArrayBuffers

https://reviewboard.mozilla.org/r/184768/#review190162

LGTM - just the one comment.

::: dom/webauthn/tests/u2futil.js:288
(Diff revision 1)
>  }
>  
>  function verifySignature(key, data, derSig) {
> -  let sigAsn1 = org.pkijs.fromBER(derSig.buffer);
> +  if (derSig.byteLength < 70) {
> +    console.log("bad sig: " + hexEncode(new Uint8Array(derSig)))
> +    throw "Invalid signature length: " + derSig.byteLength;

Should this be `return Promise.reject("...");`?
Attachment #8913433 - Flags: review?(dkeeler) → review+
(Assignee)

Comment 3

2 years ago
mozreview-review-reply
Comment on attachment 8913433 [details]
Bug 1401803 - WebAuthn types need to return ArrayBuffers

https://reviewboard.mozilla.org/r/184768/#review190162

Thanks for the review!

> Should this be `return Promise.reject("...");`?

Wouldn't hurt!
Comment hidden (mozreview-request)
(Assignee)

Comment 5

2 years ago
Try run is OK. Marking checkin-needed.
Keywords: checkin-needed

Comment 6

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b4e07901ada4
WebAuthn types need to return ArrayBuffers r=keeler
Keywords: checkin-needed

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b4e07901ada4
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1405431
status-firefox57: affected → wontfix
You need to log in before you can comment on or make changes to this bug.