From 934a03ea79c721b8b9a4fcf87bbbd97cb6b11316 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Tue, 2 Nov 2021 14:54:40 +0200 Subject: [PATCH] lwm2m - authorization in Bootstrap session default true --- .../bootstrap/secure/LwM2mDefaultBootstrapSessionManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/secure/LwM2mDefaultBootstrapSessionManager.java b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/secure/LwM2mDefaultBootstrapSessionManager.java index b12ae1c91f..097b69f806 100644 --- a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/secure/LwM2mDefaultBootstrapSessionManager.java +++ b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/secure/LwM2mDefaultBootstrapSessionManager.java @@ -80,7 +80,7 @@ public class LwM2mDefaultBootstrapSessionManager extends DefaultBootstrapSession @Override public BootstrapSession begin(BootstrapRequest request, Identity clientIdentity) { - boolean authorized; + boolean authorized = true; Iterator securityInfos; try { if (bsSecurityStore != null && securityChecker != null) { @@ -90,8 +90,6 @@ public class LwM2mDefaultBootstrapSessionManager extends DefaultBootstrapSession securityInfos = bsSecurityStore.getAllByEndpoint(request.getEndpointName()); } authorized = securityChecker.checkSecurityInfos(request.getEndpointName(), clientIdentity, securityInfos); - } else { - authorized = true; } } catch (LwM2MAuthException e) { authorized = false;