Unhandled null reference in UserAuthenticationResource #3739
Labels
group:support
All requests that are linked to a customer request. DRI: Tassilo
scope:webapp
Changes to all the webapps.
type:bug
Issues that describe a user-facing bug in the project.
version:7.22.3
version:7.23.0
Environment (Required on creation)
Camunda 7.19.0+ & 7.18.6+
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
When using an external authentication system, in case the user is no longer existent, the
UserAuthenticationResource
will throw aNullPointerException
.Steps to reproduce (Required on creation)
Observed Behavior (Required on creation)
An NPE is thrown and the user is logged out.
Expected behavior (Required on creation)
The user is logged out and Camunda returns a different error (It could be "Unauthorized")
Root Cause (Required on prioritization)
The user is fetched from the identity provider and used without a null check. If it is
null
, we run into an NPE.camunda-bpm-platform/webapps/assembly/src/main/java/org/camunda/bpm/webapp/impl/security/auth/UserAuthenticationResource.java
Line 101 in de1e0af
Solution Ideas
Add a null check to the authentication code and return
unauthorized
if it is.Hints
Links
Breakdown
Pull Requests
Dev2QA handover
The text was updated successfully, but these errors were encountered: