Skip to content

Fix PublicKeyCredentialType.PUBLIC_KEY comparison with Spring Session #17223

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ltanguy
Copy link

@ltanguy ltanguy commented Jun 10, 2025

Replace comparison based on the != operator by an .equals() comparison based on the text value. The 2 objects have the same value in most setups, but not when used in conjunction with Spring Session for example, as the object in session is built for each request.

Fixes gh-17164

Replace comparison with != operator by an .equals() comparison based on text value.
The 2 objects have the same value in most setups, but not when used in conjunction with Spring Session for example, as the object in session is built for each request

Signed-off-by: ltanguy <loeiz.tanguy@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 10, 2025
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request! Can you please:

  • add a unit test for this change?
  • rebase this off the oldest version of the code that contains this bug so that it is fixed for older versions? We will merge the bug forward

@rwinch rwinch self-assigned this Jun 17, 2025
@rwinch rwinch added in: web An issue in web modules (web, webmvc) type: bug A general bug status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 17, 2025
@rwinch rwinch changed the title WebAuthn: Fix credential parameters conversion to WebAuthn4j object model when used with Spring Session Fix PublicKeyCredentialType.PUBLIC_KEY comparison with Spring Session Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) status: waiting-for-feedback We need additional information before we can continue type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebAuthn: credential registration fails with an unknown credential type error
3 participants