Commit Graph

204 Commits

Author SHA1 Message Date
Akshay Kumar
aff7fc2c26 Bug 1508115 - Web Authentication - Support Windows Hello r=keeler,jcj,baku
This change adopts Windows Win32 WebAuthN APIs from https://github.com/Microsoft/webauthn

Differential Revision: https://phabricator.services.mozilla.com/D15752

--HG--
extra : moz-landing-system : lando
2019-01-21 01:10:44 +00:00
Andrew McCreight
9e451b1da0 Bug 1517611 - Cycle collect WebAuthnManager and U2F more. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17026

--HG--
extra : moz-landing-system : lando
2019-01-18 23:21:46 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Jeff Walden
ed23151bd7 Bug 1492937 - Make the JS subscript loader load scripts exclusively as UTF-8, with no way to specify any other encoding, and adjust a bunch of existing tests to use UTF-8 directly, rather than Unicode escape sequences or similar. (This also changes the encoding of .sjs scripts and all mochitest-browser tests in the tree from Latin-1 to UTF-8.) r=yzen, r=MattN, r=jimb, r=kmag 2018-12-19 13:46:20 -08:00
J.C. Jones
884c261af0 Bug 1514247 - Upgrade u2f-hid-rs to 0.2.3 r=emilio,keeler
This patch moves u2f-hid-rs to 0.2.3 [1], which changes the dependency graph of
u2f-hid-rs to not directly rely on the low-level core-foundation-sys library, as
core-foundation has all the features u2f-hid-rs needs in 0.6.1+.

This patch vendors core-foundation 0.6.3 and core-foundation-sys 0.6.2 as a
consequence.

[1] https://github.com/jcjones/u2f-hid-rs/releases/tag/v0.2.3
[2] d1d36d1044

Differential Revision: https://phabricator.services.mozilla.com/D14569

--HG--
extra : moz-landing-system : lando
2018-12-14 19:40:03 +00:00
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Ciure Andrei
ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner
8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan-Erik Rediger
5fd1cd8036 Bug 1498163 - Migrate external callers to the new snapshot API r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D12890

--HG--
extra : moz-landing-system : lando
2018-11-28 09:36:03 +00:00
Andreea Pavel
ebe85db8e7 Backed out changeset ad857edac6a5 (bug 1498163) for failing devtools/client/performance/test/browser_perf-telemetry-04.js on a CLOSED TREE 2018-11-27 11:05:28 +02:00
Jan-Erik Rediger
c6e72f0819 Bug 1498163 - Migrate external callers to the new snapshot API r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D12890

--HG--
extra : moz-landing-system : lando
2018-11-26 14:34:23 +00:00
Daniel Varga
e86b1d05f8 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : mobile/android/chrome/geckoview/GeckoViewNavigationContent.js => mobile/android/chrome/geckoview/GeckoViewNavigationChild.js
2018-11-02 00:27:53 +02:00
Jan-Erik Rediger
50555e7773 Bug 1468761 - Migrate external Telemetry tests to handle packed histograms r=chutten
Depends on D9236

Differential Revision: https://phabricator.services.mozilla.com/D9237

--HG--
extra : moz-landing-system : lando
2018-11-01 13:46:59 +00:00
Gijs Kruitbosch
005a826873 Bug 1501089 - fix focus/minimize handling in webauthn tests to be less error-prone, r=keeler,jcj
Differential Revision: https://phabricator.services.mozilla.com/D10335

--HG--
extra : rebase_source : 157aec9f18ee8aeb18cb4099f27a9e79b4c4c399
2018-11-01 10:59:17 +00:00
Csoregi Natalia
6ddd7d4134 Backed out 3 changesets (bug 1468761) for telemetry related xpcshell failures. CLOSED TREE
Backed out changeset 8c08dcec61d8 (bug 1468761)
Backed out changeset 9ee8406cf1d3 (bug 1468761)
Backed out changeset 65bfae07e0f4 (bug 1468761)
2018-10-22 19:28:56 +03:00
Jan-Erik Rediger
2cb5051a6c Bug 1468761 - Migrate external Telemetry tests to handle packed histograms r=chutten
Depends on D9236

Differential Revision: https://phabricator.services.mozilla.com/D9237

--HG--
extra : moz-landing-system : lando
2018-10-22 15:26:34 +00:00
J.C. Jones
45039bb033 Bug 1494386 - Uplift u2f-hid-rs 0.2.2, Windows aarch64 fix r=keeler
See https://github.com/jcjones/u2f-hid-rs/pull/67

Differential Revision: https://phabricator.services.mozilla.com/D7795

--HG--
extra : moz-landing-system : lando
2018-10-05 00:05:04 +00:00
Gurzau Raul
ede1418858 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-02 19:08:39 +03:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Dana Keeler
3d31cfbfef bug 1483905 - ensure the WebAuthnManager stays alive while WebAuthnTransactionChild is using it r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D5305

--HG--
extra : rebase_source : 1c05f0cd33954fe0127e295b4c76eed40f75e6ef
2018-09-07 09:17:19 -07:00
arthur.iakab
e9fe8be654 Backed out changeset a653a439a39b (bug 1483905)for build bustages on webauthn/WebAuthnTransactionChild.cpp:35 CLOSED TREE 2018-10-01 14:11:57 +03:00
Dana Keeler
6012e76803 Bug 1483905 - Ensure the WebAuthnManager stays alive while WebAuthnTransactionChild is using it. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D5305
2018-10-01 06:58:34 -04:00
J.C. Jones
c603d5f53f Bug 1492973 - Update u2f-hid-rs to 0.2.1 r=froydnj
Moves winapi dependency to 0.3.5 and updates rust-fmt

Differential Revision: https://phabricator.services.mozilla.com/D6436

--HG--
extra : moz-landing-system : lando
2018-09-20 22:04:15 +00:00
Brian Grinstead
150199f6f8 Bug 1488938 - Round two: migrate mochitest-browser tests to use element variations of firstChild, etc;r=Gijs
This is a follow up to Bug 1482667. The list of callers was gathered by instrumenting
the webidl calls to these methods and dumping JS stack when they are called in browser.xul.

Differential Revision: https://phabricator.services.mozilla.com/D5185

--HG--
extra : moz-landing-system : lando
2018-09-07 15:31:38 +00:00
Andrea Marchesini
2dd8d57be4 Bug 1480365: WebAuthManager doesn't need to keep alive AbortSignal, r=smaug 2018-08-06 21:01:53 +02:00
Franziskus Kiefer
a52a8495f9 Bug 1479787 - use NSS mozpkix in Firefox, r=mt,keeler,glandium
Differential Revision: https://phabricator.services.mozilla.com/D2725
Differential Revision: https://phabricator.services.mozilla.com/D2860

--HG--
extra : rebase_source : 189c13c2a3104c106fcabad5998af6cb2e20d4a5
2018-10-02 14:59:34 +02:00
Jan de Mooij
4f7b2378dc Bug 1474273 - Add xpc::CurrentNativeGlobal and use it instead of NativeGlobal(JS::CurrentGlobalOrNull(cx)). r=bz 2018-07-11 14:07:02 +02:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
David Keeler
e3dc094a76 bug 1468909 - enforce that all given RP IDs be valid domain strings in webauthn r=qdot
The webauthn spec mandates that relying party identifiers (RP IDs) are valid
domain strings. This enforces that by ensuring that any passed-in RP IDs parse
correctly when set as the host portion of a URL.

https://w3c.github.io/webauthn/#relying-party-identifier

--HG--
extra : rebase_source : 6be22c9be660db3062f4e8119051cd122bc24a12
2018-06-19 14:29:45 -07:00
Greg V
6efd24a566 Bug 1468349 - Web Authentication - Add FreeBSD Support r=jcj
Summary:
Upstream PR: https://github.com/jcjones/u2f-hid-rs/pull/62

* Extract hidproto module from linux::hidraw
Make the protocol parts independent of Linux code, in preparation for
adding FreeBSD support.

* Add FreeBSD (uhid + devd) support
Tested with a YubiKey 4.

Tags: #secure-revision

Bug #: 1468349

Differential Revision: https://phabricator.services.mozilla.com/D1636

MozReview-Commit-ID: 8NNWRgTEMn2

--HG--
extra : rebase_source : edf774f0a993a18b59b5f8aa10e0977d94ea1de8
2018-06-12 09:55:30 -07:00
Andreea Pavel
f93bd1a2dd Backed out changeset 80190d88549c (bug 1468349) for build bustages on a CLOSED TREE 2018-06-12 20:18:58 +03:00
Greg V
ee92007fde Bug 1468349 - Web Authentication - Add FreeBSD Support
Upstream PR: https://github.com/jcjones/u2f-hid-rs/pull/62

* Extract hidproto module from linux::hidraw
Make the protocol parts independent of Linux code, in preparation for
adding FreeBSD support.

* Add FreeBSD (uhid + devd) support
Tested with a YubiKey 4.

Differential Revision: https://phabricator.services.mozilla.com/D1636
2018-06-12 16:59:10 +00:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Tim Taubert
2a252e45a4 Bug 1464015 - Web Authentication - Rework IPC layer for future Android/Windows support r=jcj
Reviewers: jcj

Reviewed By: jcj

Subscribers: mgoodwin

Bug #: 1464015

Differential Revision: https://phabricator.services.mozilla.com/D1378
2018-05-30 16:06:09 +02:00
J.C. Jones
9ca7fca83d Bug 1463170 - Set AuthenticatorAssertionResponse.userHandle to null r=ttaubert r=smaug
Summary:
The WebAuthn spec says to set `AuthenticatorAssertionResponse.userHandle` to
null when the authenticator returns no user handle (e.g., when allowList is set),
but we return an empty ArrayBuffer. This is because of the defaults in
AuthenticatorAssertionResponse.h, as the field is itself unset.

We missed this change to the spec that happened in December [2], so this also
has a corresponding WebIDL update. I don't see any other instances of WebIDL
differences.

[1] https://w3c.github.io/webauthn/#ref-for-dom-authenticatorassertionresponse-userhandle%E2%91%A0
[2] 3b2a1d141c

Test Plan: https://treeherder.mozilla.org/#/jobs?repo=try&revision=59a2ab255ef14e935c1aa9f457276f8e61e5d779

Reviewers: smaug, ttaubert

Bug #: 1463170

Differential Revision: https://phabricator.services.mozilla.com/D1337

--HG--
extra : amend_source : 966dcd24050585e745078648e1d7995b3beaf9ca
extra : transplant_source : h%3E%B7COQ%F3%05%A9%95%1C%5D%CD%E1XZ%06Z%8D%83
2018-05-21 09:04:50 -07:00
Tim Taubert
2b5e4e52b4 Bug 1462324 - Remove unused WebAuthnTransaction::mDirectAttestation r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1462324

Differential Revision: https://phabricator.services.mozilla.com/D1301
2018-05-17 18:32:53 +02:00
Tim Taubert
37ab4344d8 Bug 1460301 - Web Authentication - Don't use U2F_PING to initialize tokens r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1460301

Differential Revision: https://phabricator.services.mozilla.com/D1270
2018-05-14 17:37:47 +02:00
J.C. Jones
b1cbda2eea Bug 1460767 - Return device ineligible when appropriate for U2F r=ttaubert
Summary:
FIDO U2F's specification says that when the wrong security key responds to a
signature, or when an already-registered key exists, that the UA should return
error code 4, DEVICE_INELIGIBLE. We used to do that, but adjusted some things
for WebAuthn and now we don't. This changes the soft token to return that at
the appropriate times, and updates the expectations of U2F.cpp that it should
use InvalidStateError as the signal to reutrn DEVICE_INELIGIBLE.

Also, note that WebAuthn's specification says that if any authenticator returns
"InvalidStateError" that it should be propagated, as it indicates that the
authenticator obtained user consent and failed to complete its job [1].

This change to the Soft Token affects the WebAuthn tests, but in a good way.
Reading the WebAuthn spec, we should not be returning NotAllowedError when there
is consent from the user via the token (which the softtoken always deliveres).

As such, this adjusts the affected WebAuthn tests, and adds a couple useful
checks to test_webauthn_get_assertion.html for future purposes.

[1] https://w3c.github.io/webauthn/#createCredential section 5.1.3 "Create a new
    credential", Step 20, Note 2: "If any authenticator returns an error status
    equivalent to "InvalidStateError"..."

Test Plan: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2fc930f7fc8eea69b1ebc96748fe95e150a92a4

Reviewers: ttaubert

Bug #: 1460767

Differential Revision: https://phabricator.services.mozilla.com/D1269

--HG--
extra : transplant_source : M%5B%93%81%29%7E%B2%E8%24%05%A6%96%8BUN%C9%FB%3E%B3h
2018-05-10 16:36:18 -07:00
Tim Taubert
e966f910ac Bug 1459558 - Sync u2f-hid-rs changes r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1459558

Differential Revision: https://phabricator.services.mozilla.com/D1145

--HG--
rename : third_party/rust/core-foundation/.cargo-checksum.json => third_party/rust/core-foundation-0.5.1/.cargo-checksum.json
rename : third_party/rust/core-foundation/Cargo.toml => third_party/rust/core-foundation-0.5.1/Cargo.toml
rename : third_party/rust/core-foundation/src/array.rs => third_party/rust/core-foundation-0.5.1/src/array.rs
rename : third_party/rust/core-foundation/src/base.rs => third_party/rust/core-foundation-0.5.1/src/base.rs
rename : third_party/rust/core-foundation/src/bundle.rs => third_party/rust/core-foundation-0.5.1/src/bundle.rs
rename : third_party/rust/core-foundation/src/dictionary.rs => third_party/rust/core-foundation-0.5.1/src/dictionary.rs
rename : third_party/rust/core-foundation/src/filedescriptor.rs => third_party/rust/core-foundation-0.5.1/src/filedescriptor.rs
rename : third_party/rust/core-foundation/src/lib.rs => third_party/rust/core-foundation-0.5.1/src/lib.rs
rename : third_party/rust/core-foundation/src/propertylist.rs => third_party/rust/core-foundation-0.5.1/src/propertylist.rs
rename : third_party/rust/core-foundation/src/runloop.rs => third_party/rust/core-foundation-0.5.1/src/runloop.rs
rename : third_party/rust/core-foundation/src/set.rs => third_party/rust/core-foundation-0.5.1/src/set.rs
rename : third_party/rust/core-foundation/tests/use_macro_outside_crate.rs => third_party/rust/core-foundation-0.5.1/tests/use_macro_outside_crate.rs
rename : third_party/rust/core-foundation-sys/.cargo-checksum.json => third_party/rust/core-foundation-sys-0.5.1/.cargo-checksum.json
rename : third_party/rust/core-foundation-sys/Cargo.toml => third_party/rust/core-foundation-sys-0.5.1/Cargo.toml
rename : third_party/rust/core-foundation-sys/src/array.rs => third_party/rust/core-foundation-sys-0.5.1/src/array.rs
rename : third_party/rust/core-foundation-sys/src/base.rs => third_party/rust/core-foundation-sys-0.5.1/src/base.rs
rename : third_party/rust/core-foundation-sys/src/bundle.rs => third_party/rust/core-foundation-sys-0.5.1/src/bundle.rs
rename : third_party/rust/core-foundation-sys/src/data.rs => third_party/rust/core-foundation-sys-0.5.1/src/data.rs
rename : third_party/rust/core-foundation-sys/src/date.rs => third_party/rust/core-foundation-sys-0.5.1/src/date.rs
rename : third_party/rust/core-foundation-sys/src/dictionary.rs => third_party/rust/core-foundation-sys-0.5.1/src/dictionary.rs
rename : third_party/rust/core-foundation-sys/src/error.rs => third_party/rust/core-foundation-sys-0.5.1/src/error.rs
rename : third_party/rust/core-foundation-sys/src/filedescriptor.rs => third_party/rust/core-foundation-sys-0.5.1/src/filedescriptor.rs
rename : third_party/rust/core-foundation-sys/src/lib.rs => third_party/rust/core-foundation-sys-0.5.1/src/lib.rs
rename : third_party/rust/core-foundation-sys/src/messageport.rs => third_party/rust/core-foundation-sys-0.5.1/src/messageport.rs
rename : third_party/rust/core-foundation-sys/src/number.rs => third_party/rust/core-foundation-sys-0.5.1/src/number.rs
rename : third_party/rust/core-foundation-sys/src/propertylist.rs => third_party/rust/core-foundation-sys-0.5.1/src/propertylist.rs
rename : third_party/rust/core-foundation-sys/src/runloop.rs => third_party/rust/core-foundation-sys-0.5.1/src/runloop.rs
rename : third_party/rust/core-foundation-sys/src/set.rs => third_party/rust/core-foundation-sys-0.5.1/src/set.rs
rename : third_party/rust/core-foundation-sys/src/string.rs => third_party/rust/core-foundation-sys-0.5.1/src/string.rs
rename : third_party/rust/core-foundation-sys/src/timezone.rs => third_party/rust/core-foundation-sys-0.5.1/src/timezone.rs
rename : third_party/rust/core-foundation-sys/src/url.rs => third_party/rust/core-foundation-sys-0.5.1/src/url.rs
rename : third_party/rust/core-foundation-sys/src/uuid.rs => third_party/rust/core-foundation-sys-0.5.1/src/uuid.rs
2018-05-08 10:04:52 +02:00
Tim Taubert
368a1dde38 Bug 1458755 - Web Authentication - Copy flag bits 0 & 1 for Sign operations r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1458755

Differential Revision: https://phabricator.services.mozilla.com/D1114

--HG--
extra : amend_source : 349a05210460beefbfe0dcc3e3f36885bb02246c
2018-05-07 11:23:10 +02:00
Tim Taubert
c9c8df1225 Bug 1459174 - Web Authentication - Use sha2 crate instead of rust-crypto for example/main r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1459174

Differential Revision: https://phabricator.services.mozilla.com/D1116

--HG--
extra : amend_source : bbd971da279930b9689dd282804f5f14e9d65991
2018-05-04 14:33:46 +02:00
Tim Taubert
c6c270b3f6 Bug 1459173 - Web Authentication - rustfmt u2f-hid-rs r=jcj
Reviewers: jcj

Reviewed By: jcj

Bug #: 1459173

Differential Revision: https://phabricator.services.mozilla.com/D1115

--HG--
extra : amend_source : a23a6a2a00f31b8cb3b14c323917aec7b9a660b7
2018-05-04 14:28:20 +02:00
Emilio Cobos Álvarez
a1b2e5070a Bug 1455885: Inline and make document casts fatally assert. r=bz
For consistency with AsElement / AsContent / AsDocumentFragment, etc.

MozReview-Commit-ID: 8GSj8R9hLBe
2018-04-26 17:05:12 +02:00
Boris Zbarsky
4643230674 Bug 1455055 part 6. Clean up HandleEvent implementations in dom. r=masayuki
MozReview-Commit-ID: Ht7HQEhVS8E
2018-04-20 00:49:30 -04:00
Boris Zbarsky
2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Kris Maglione
219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Andreea Pavel
7a4b9a3f56 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
extra : rebase_source : 66bd87105d99036ada5008499ff0eaea579b531a
2018-04-06 13:20:21 +03:00
Boris Zbarsky
1dce94cf16 Bug 1449631 part 2. Remove nsIDOMEventTarget::RemoveEventListener. r=smaug
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().

MozReview-Commit-ID: 9iAg0ivVqqG
2018-04-05 13:42:40 -04:00
Matt Brubeck
4aa522320e Bug 1451825 - Update to env_logger 0.5. r=ted
MozReview-Commit-ID: CqKdONY1NMT

--HG--
extra : rebase_source : 29f9c7a40cf71847a6f5e5e3f33e8695e9bd0b64
2018-04-05 10:08:05 -07:00