web-auth / webauthn-framework

FIDO-U2F / FIDO2 / Webauthn Framework
MIT License
420 stars 54 forks source link

Paramater `residentKey` will be ignored when Initializing AuthenticatorSelectionCriteria #516

Closed tomocrafter closed 11 months ago

tomocrafter commented 11 months ago

Version(s) affected

4.7.4

Description

Paramater residentKey will be ignored when Initializing AuthenticatorSelectionCriteria

How to reproduce

new AuthenticatorSelectionCriteria(null, "preferred", "required")->residentKey;

Possible Solution

This line should be $this->residentKey = $residentKey !== null ? $residentKey : ($requireResidentKey === true ? self::RESIDENT_KEY_REQUIREMENT_REQUIRED : self::RESIDENT_KEY_REQUIREMENT_PREFERRED); https://github.com/web-auth/webauthn-framework/blob/d7b7eb73bc017c636f2bcf3b14ade11c3691cc0b/src/webauthn/src/AuthenticatorSelectionCriteria.php#L80

Additional Context

No response

Spomky commented 11 months ago

Hi,

Indeed, there is something wrong with this line. I will address this issue ASAP

tomocrafter commented 11 months ago

Hi, Thank you for response and commiting to this great library! It was hard to find solid library for webauthn in PHP so I am so pleasure to meet to this.

Thank you for looking into this problem as well, I think this can be fixed by my suggestion so Can I open the pull request with these changes?

Spomky commented 11 months ago

Done. Will be tagged soon

github-actions[bot] commented 10 months ago

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.