Skip to content

Commit

Permalink
Cherry-pick d03ef24. rdar://problem/101057340
Browse files Browse the repository at this point in the history
    REGRESSION(255205@main): Not all members of PublicKeyCredentialRequestOptions should be serialized
    https://bugs.webkit.org/show_bug.cgi?id=246432
    rdar://101057340

    Reviewed by J Pascoe.

    * Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h:
    * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

    Canonical link: https://commits.webkit.org/255463@main

Canonical link: https://commits.webkit.org/255303.3@safari-7615.1.9-branch
  • Loading branch information
Alex Christensen authored and alancoon committed Oct 13, 2022
1 parent 9cad1e4 commit 37e34ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Expand Up @@ -34,7 +34,7 @@ namespace WebCore {
struct AuthenticationExtensionsClientInputs {
String appid;
bool googleLegacyAppidSupport;
bool credProps;
bool credProps; // Not serialized but probably should be. Don't re-introduce rdar://101057340 though.

WEBCORE_EXPORT Vector<uint8_t> toCBOR() const;
WEBCORE_EXPORT static std::optional<AuthenticationExtensionsClientInputs> fromCBOR(Span<const uint8_t>);
Expand Down
Expand Up @@ -43,8 +43,8 @@ struct PublicKeyCredentialRequestOptions {
mutable String rpId;
Vector<PublicKeyCredentialDescriptor> allowCredentials;
UserVerificationRequirement userVerification { UserVerificationRequirement::Preferred };
std::optional<AuthenticatorAttachment> authenticatorAttachment;
mutable std::optional<AuthenticationExtensionsClientInputs> extensions;
std::optional<AuthenticatorAttachment> authenticatorAttachment { }; // Not serialized over IPC.
#endif // ENABLE(WEB_AUTHN)
};

Expand Down
4 changes: 1 addition & 3 deletions Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Expand Up @@ -879,10 +879,9 @@ struct WebCore::WebLockManagerSnapshot {
};

#if ENABLE(WEB_AUTHN)
struct WebCore::AuthenticationExtensionsClientInputs {
[LegacyPopulateFrom=EmptyConstructor] struct WebCore::AuthenticationExtensionsClientInputs {
String appid;
bool googleLegacyAppidSupport;
bool credProps;
}

[Nested] struct WebCore::AuthenticationExtensionsClientOutputs::CredentialPropertiesOutput {
Expand Down Expand Up @@ -950,7 +949,6 @@ struct WebCore::PublicKeyCredentialRequestOptions {
String rpId;
Vector<WebCore::PublicKeyCredentialDescriptor> allowCredentials;
WebCore::UserVerificationRequirement userVerification;
std::optional<WebCore::AuthenticatorAttachment> authenticatorAttachment;
std::optional<WebCore::AuthenticationExtensionsClientInputs> extensions;
#endif // ENABLE(WEB_AUTHN)
};

0 comments on commit 37e34ec

Please sign in to comment.