diff --git a/index.bs b/index.bs index b62911822..fcadfa74b 100644 --- a/index.bs +++ b/index.bs @@ -3835,8 +3835,7 @@ to verify an encoded {{CollectedClientData}} if they cannot support a full JSON 1. A string, |type|, that contains the expected {{CollectedClientData/type}}. 1. A byte string, |challenge|, that contains the challenge byte string that was given in the {{PublicKeyCredentialRequestOptions}} or {{PublicKeyCredentialCreationOptions}}. 1. A string, |origin|, that contains the expected {{CollectedClientData/origin}} that issued the request to the user agent. - 1. A boolean, |crossOrigin|, that is true if, and only if, the request should have been performed within a cross-origin <{iframe}>. - 1. An optional string, |topOrigin|, that contains the expected {{CollectedClientData/topOrigin}} that issued the request to the user agent if |crossOrigin| is true and if available. + 1. An optional string, |topOrigin|, that contains the expected {{CollectedClientData/topOrigin}} that issued the request to the user agent, if available. 1. A boolean, |requireTopOrigin|, that is true if, and only if, the validation should fail if |topOrigin| is defined and the {{CollectedClientData/topOrigin}} attribute is not present in |clientDataJSON|. @@ -3854,15 +3853,14 @@ to verify an encoded {{CollectedClientData}} if they cannot support a full JSON 1. Append 0x2c226f726967696e223a (`,"origin":`) to |expected|. 1. Append [=CCDToString=](|origin|) to |expected|. 1. Append 0x2c2263726f73734f726967696e223a (`,"crossOrigin":`) to |expected|. -1. If |crossOrigin| is true: +1. If |topOrigin| is defined: 1. Append 0x74727565 (`true`) to |expected|. - 1. If |topOrigin| is defined: - 1. If |requireTopOrigin| is true - or if 0x2c22746f704f726967696e223a (`,"topOrigin":`) is a prefix - of the substring of |clientDataJSON| beginning at the offset equal to the length of |expected|: - 1. Append 0x2c22746f704f726967696e223a (`,"topOrigin":`) to |expected|. - 1. Append [=CCDToString=](|topOrigin|) to |expected|. -1. Otherwise, i.e. |crossOrigin| is false: + 1. If |requireTopOrigin| is true + or if 0x2c22746f704f726967696e223a (`,"topOrigin":`) is a prefix + of the substring of |clientDataJSON| beginning at the offset equal to the length of |expected|: + 1. Append 0x2c22746f704f726967696e223a (`,"topOrigin":`) to |expected|. + 1. Append [=CCDToString=](|topOrigin|) to |expected|. +1. Otherwise, i.e. |topOrigin| is not defined: 1. Append 0x66616c7365 (`false`) to |expected|. 1. If |expected| is not a prefix of |clientDataJSON| then the verification has failed. 1. If |clientDataJSON| is not at least one byte longer than |expected| then the verification has failed.