Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Illegal Invokcation on getPublicKey/getPublicKeyAlgorithm #2323

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Keroosha
Copy link

Fixes #2322

return Object.setPrototypeOf(response, AuthenticatorAttestationResponse.prototype);
// Prevent Illegal invocation error
const responseWithProto = Object.setPrototypeOf(response, AuthenticatorAttestationResponse.prototype);
responseWithProto.getPublicKey = () => null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not define these directly to the response above?

Copy link
Author

@Keroosha Keroosha Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge it with object initialization, yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Illegal Invocation error on getPublicKey and getPublicKeyAlgorithm calls
2 participants