Backed out changeset 89ac5a28c228 (bug 1436078) for build bustage on multiple platforms on a CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Wed, 07 Feb 2018 17:42:52 +0200
changeset 457759 66e626da016edca4f8d1f1f544b6981bed0d2906
parent 457758 2dae8d427e396a985697f0b1d1597812f3ff30f9
child 457760 4fbc72f0615eaadca583143c1430a33ffbf54b17
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1436078
milestone60.0a1
backs out89ac5a28c228649e436cd8dbcec0d395c231e4e1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 89ac5a28c228 (bug 1436078) for build bustage on multiple platforms on a CLOSED TREE
dom/u2f/U2F.cpp
--- a/dom/u2f/U2F.cpp
+++ b/dom/u2f/U2F.cpp
@@ -30,22 +30,16 @@ public:
 namespace mozilla {
 namespace dom {
 
 static mozilla::LazyLogModule gU2FLog("u2fmanager");
 
 NS_NAMED_LITERAL_STRING(kFinishEnrollment, "navigator.id.finishEnrollment");
 NS_NAMED_LITERAL_STRING(kGetAssertion, "navigator.id.getAssertion");
 
-// Bug #1436078 - Permit Google Accounts. Remove in Bug #1436085 in Jan 2023.
-NS_NAMED_LITERAL_STRING(kGoogleAccountsAppId1,
-  "https://www.gstatic.com/securitykey/origins.json");
-NS_NAMED_LITERAL_STRING(kGoogleAccountsAppId2,
-  "https://www.gstatic.com/securitykey/a/google.com/origins.json");
-
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(U2F)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(U2F)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(U2F)
@@ -123,25 +117,19 @@ RegisteredKeysToScopedCredentialList(con
     }
 
     WebAuthnScopedCredential c;
     c.id() = keyHandle;
     aList.AppendElement(c);
   }
 }
 
-static enum U2FOperation
-{
-  Register,
-  Sign
-};
-
 static ErrorCode
 EvaluateAppID(nsPIDOMWindowInner* aParent, const nsString& aOrigin,
-              const U2FOperation& aOp, /* in/out */ nsString& aAppId)
+              /* in/out */ nsString& aAppId)
 {
   // Facet is the specification's way of referring to the web origin.
   nsAutoCString facetString = NS_ConvertUTF16toUTF8(aOrigin);
   nsCOMPtr<nsIURI> facetUri;
   if (NS_FAILED(NS_NewURI(getter_AddRefs(facetUri), facetString))) {
     return ErrorCode::BAD_REQUEST;
   }
 
@@ -215,25 +203,16 @@ EvaluateAppID(nsPIDOMWindowInner* aParen
   MOZ_LOG(gU2FLog, LogLevel::Debug,
           ("AppId %s Facet %s", appIdHost.get(), lowestFacetHost.get()));
 
   if (html->IsRegistrableDomainSuffixOfOrEqualTo(NS_ConvertUTF8toUTF16(lowestFacetHost),
                                                  appIdHost)) {
     return ErrorCode::OK;
   }
 
-  // Bug #1436078 - Permit Google Accounts. Remove in Bug #1436085 in Jan 2023.
-  if (aOp == U2FOperation::Sign && lowestFacetHost.EqualsLiteral("google.com") &&
-      (aAppId.Equals(kGoogleAccountsAppId1) ||
-       aAppId.Equals(kGoogleAccountsAppId2))) {
-    MOZ_LOG(gU2FLog, LogLevel::Debug,
-            ("U2F permitted for Google Accounts via Bug #1436085"));
-    return ErrorCode::OK;
-  }
-
   return ErrorCode::BAD_REQUEST;
 }
 
 static nsresult
 BuildTransactionHashes(const nsCString& aRpId,
                        const nsCString& aClientDataJSON,
                        /* out */ CryptoBuffer& aRpIdHash,
                        /* out */ CryptoBuffer& aClientDataHash)
@@ -372,18 +351,17 @@ U2F::Register(const nsAString& aAppId,
   // Ensure we have a callback.
   if (NS_WARN_IF(!callback)) {
     return;
   }
 
   // Evaluate the AppID
   nsString adjustedAppId;
   adjustedAppId.Assign(aAppId);
-  ErrorCode appIdResult = EvaluateAppID(mParent, mOrigin, U2FOperation::Register,
-                                        adjustedAppId);
+  ErrorCode appIdResult = EvaluateAppID(mParent, mOrigin, adjustedAppId);
   if (appIdResult != ErrorCode::OK) {
     RegisterResponse response;
     response.mErrorCode.Construct(static_cast<uint32_t>(appIdResult));
     ExecuteCallback(response, callback);
     return;
   }
 
   // Produce the AppParam from the current AppID
@@ -535,18 +513,17 @@ U2F::Sign(const nsAString& aAppId,
   // Ensure we have a callback.
   if (NS_WARN_IF(!callback)) {
     return;
   }
 
   // Evaluate the AppID
   nsString adjustedAppId;
   adjustedAppId.Assign(aAppId);
-  ErrorCode appIdResult = EvaluateAppID(mParent, mOrigin, U2FOperation::Sign,
-                                        adjustedAppId);
+  ErrorCode appIdResult = EvaluateAppID(mParent, mOrigin, adjustedAppId);
   if (appIdResult != ErrorCode::OK) {
     SignResponse response;
     response.mErrorCode.Construct(static_cast<uint32_t>(appIdResult));
     ExecuteCallback(response, callback);
     return;
   }
 
   // Produce the AppParam from the current AppID