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:57:54 UTC

[ranger] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new d43d6a3ad RANGER-3737:Usersync is broken due to NullPointerException
d43d6a3ad is described below

commit d43d6a3ad3f7a32435ab964fea261ffa0caf1b37
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"));