Skip to content

Commit

Permalink
Add check if device is null
Browse files Browse the repository at this point in the history
This check is needed since not all connections are devices
  • Loading branch information
MDeLuise authored and Coduz committed Nov 24, 2022
1 parent 42ffe1f commit 27171de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ protected void addExternalConnection(ConnectionContext context, ConnectionInfo i
accessToken.getScopeId(), info.getClientId()
)
);
if (DeviceStatus.DISABLED.equals(device.getStatus())) {
if (device != null && DeviceStatus.DISABLED.equals(device.getStatus())) {
logger.warn("Device {} is disabled", info.getClientId());
throw new SecurityException("Device is disabled");
}
Expand Down

0 comments on commit 27171de

Please sign in to comment.