Skip to content

When RequestOptions.Rp.Id is null, we should default to Origin/effectiveDomain #370

@Regenhardt

Description

@Regenhardt

Currently the lib compares the rp id in the original PublicKeyRequestOptions to the rp id in the created credential. If the id was however not set in the request options, as is specified as valid in the spec (see https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialRequestOptions), it just crashes because it just passes the id to UTF8.GetBytes, which (rightly so) doesn't accept null values.

There should be a if(originalOptions.Rp.Id != null) guard before that line to guard either that one at 7) computing the hash (here) or also the one at 9) comparing said hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions