You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by bp...@apache.org on 2022/05/09 03:58:59 UTC
[ranger] branch ranger-2.3 updated: RANGER-3737:Usersync is broken due to NullPointerException
This is an automated email from the ASF dual-hosted git repository.
bpatel pushed a commit to branch ranger-2.3
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.3 by this push:
new a3a8f3e64 RANGER-3737:Usersync is broken due to NullPointerException
a3a8f3e64 is described below
commit a3a8f3e64893b538627b912d7e8b52bf4a6fcd1c
Author: Bhavik Patel <bh...@gmail.com>
AuthorDate: Thu Apr 28 15:43:52 2022 +0530
RANGER-3737:Usersync is broken due to NullPointerException
---
.../apache/ranger/security/handler/RangerAuthenticationProvider.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
index 7c21c1f29..e41fe5454 100644
--- a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
+++ b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
@@ -149,7 +149,7 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
}
// Following are JDBC
- if (sessionMgr.isLoginIdLocked(authentication.getName())) {
+ if (authentication != null && authentication.getName() != null && sessionMgr.isLoginIdLocked(authentication.getName())) {
logger.debug("Failed to authenticate since user account is locked");
throw new LockedException(messages.getMessage("AbstractUserDetailsAuthenticationProvider.locked", "User account is locked"));