Skip to content

Commit

Permalink
0004842: Exception during registration with multi-primary
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Feb 18, 2021
1 parent dab2c2f commit b523c61
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -655,11 +655,13 @@ public boolean isNodeAuthorized(String nodeId, String password) {
int maxFailedLogins = parameterService.getInt(ParameterConstants.NODE_PASSWORD_FAILED_ATTEMPTS);
Map<String, NodeSecurity> nodeSecurities = findAllNodeSecurity(true);
NodeSecurity nodeSecurity = nodeSecurities.get(nodeId);
if (nodeSecurity != null && !nodeId.equals(findIdentityNodeId())
&& ((nodeSecurity.getNodePassword() != null && !nodeSecurity.getNodePassword().equals("")
&& nodeSecurity.getNodePassword().equals(password)) || nodeSecurity.isRegistrationEnabled())
&& (maxFailedLogins <= 0 || nodeSecurity.getFailedLogins() <= maxFailedLogins) || nodeSecurity.isRegistrationEnabled()) {
return true;
if (nodeSecurity != null) {
if (!nodeId.equals(findIdentityNodeId()) && StringUtils.isNotBlank(nodeSecurity.getNodePassword())
&& nodeSecurity.getNodePassword().equals(password)
&& (maxFailedLogins <= 0 || nodeSecurity.getFailedLogins() <= maxFailedLogins)
|| nodeSecurity.isRegistrationEnabled()) {
return true;
}
}
return false;
}
Expand Down

0 comments on commit b523c61

Please sign in to comment.