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

Deprecation of PublicKeyCredentialSourceRepository #494

Closed
Jorgu5 opened this issue Oct 10, 2023 · 3 comments · Fixed by #496
Closed

Deprecation of PublicKeyCredentialSourceRepository #494

Jorgu5 opened this issue Oct 10, 2023 · 3 comments · Fixed by #496

Comments

@Jorgu5
Copy link

Jorgu5 commented Oct 10, 2023

Version(s) affected

4.7.2

Description

The AuthenticatorAssertionResponseValidator claims to have optional dependency on PublicKeyCredentialSourceRepository starting from version 4.6.0. However, this isn't entirely accurate. In line 144, the code checks if $credentialId is a string. If it is, the findOneByCredentialId method within PublicKeyCredentialSourceRepository is called. Since this method returns null when the repository is not set, the system outputs "The credential ID is invalid."

How to reproduce

$this->authenticatorAssertionResponseValidator::create(
null,
null,
ExtensionOutputCheckerHandler::create()
AlgorithmManager::init(),
null
)

will return The credential ID is invalid.

Possible Solution

Return directly $credential ID and bypass findOneByCredentialId method.

Additional Context

No response

@Spomky Spomky linked a pull request Oct 15, 2023 that will close this issue
4 tasks
@Spomky
Copy link
Contributor

Spomky commented Oct 15, 2023

Hi,

You are right, if a CredentialId is passed as a argument, the repository shall be defined.
There is a deprecation notice for the CredentialId at line 122, but if the repository argument is set to null it will fails.
I created a PR for fixing this and indicates the reason for failure.

@Spomky
Copy link
Contributor

Spomky commented Nov 22, 2023

PR was merged and tag added.

@Spomky Spomky closed this as completed Nov 22, 2023
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants