Skip to content

Fix WebAuthn unknown transport deserialization#19369

Open
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:gh-19366-webauthn-unknown-transport
Open

Fix WebAuthn unknown transport deserialization#19369
xfocus3 wants to merge 1 commit into
spring-projects:mainfrom
xfocus3:gh-19366-webauthn-unknown-transport

Conversation

@xfocus3

@xfocus3 xfocus3 commented Jun 23, 2026

Copy link
Copy Markdown

Fixes gh-19366

AuthenticatorTransport already preserves unknown transport names, but the Jackson deserializers returned null for transport strings outside the built-in constants. Registration payloads that include values such as "cable" could then fail later when the registration flow reads the transport value.

This updates both Jackson 3 and Jackson 2 deserializers to delegate to AuthenticatorTransport.valueOf(...), preserving unknown transport values while still returning the existing constants for known values.

Tests:

  • RED: ./gradlew :spring-security-webauthn:test --tests org.springframework.security.web.webauthn.jackson.JacksonTests.readAuthenticatorTransportWhenUnknownThenPreservesValue --tests org.springframework.security.web.webauthn.jackson.Jackson2Tests.readAuthenticatorTransportWhenUnknownThenPreservesValue --no-daemon
  • GREEN: ./gradlew :spring-security-webauthn:test --tests org.springframework.security.web.webauthn.jackson.JacksonTests.readAuthenticatorTransportWhenUnknownThenPreservesValue --tests org.springframework.security.web.webauthn.jackson.Jackson2Tests.readAuthenticatorTransportWhenUnknownThenPreservesValue --no-daemon
  • ./gradlew :spring-security-webauthn:test --tests org.springframework.security.web.webauthn.jackson.JacksonTests --tests org.springframework.security.web.webauthn.jackson.Jackson2Tests --no-daemon
  • ./gradlew :spring-security-webauthn:test --no-daemon
  • git diff --check HEAD^ HEAD

Signed-off-by: Ahmed El amraouiyine <amraouiyine@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException during WebAuthn registration when authenticator transport is unknown (e.g. "cable")

2 participants