Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-12900

NullPointerException when "Try Again" during WebAuthn registration

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 9.0.0
    • Component/s: None
    • Labels:

      Description

      1) Add "WebAuthn Register Passwordless" required action to some user and login.
      2) WebAuthn Register required action is triggered
      3) Browser dialog about register new WebAuthn credential is shown.
      4) I click "Cancel" on the browser dialog. Error page is shown with the message "Security key registration result is invalid."
      5) I click "Try Again" . The page "We are sorry" is shown and the NullPointerException in server.log with stacktrace like this:

      08:38:29,265 ERROR XNIO-1 task-8 [org.keycloak.services.error.KeycloakErrorHandler] Uncaught server error
      java.lang.NullPointerException
      	at java.util.Base64$Decoder.decode(Base64.java:549)
      	at org.keycloak.authentication.requiredactions.WebAuthnRegister.processAction(WebAuthnRegister.java:181)
      	at org.keycloak.services.resources.LoginActionsService.processRequireAction(LoginActionsService.java:999)
      	at org.keycloak.services.resources.LoginActionsService.requiredActionPOST(LoginActionsService.java:937)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)
      	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:517)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mabartos Martin Bartos
                Reporter:
                mposolda Marek Posolda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: