Fix NPE in LDAP Helper class if username is null
Bug: issue 1622 Change-Id: Id96d75e40be4605dadba233ed7954363c7ee8812 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
		@@ -111,9 +111,11 @@ import javax.security.auth.login.LoginException;
 | 
			
		||||
    if ("GSSAPI".equals(authentication)) {
 | 
			
		||||
      return kerberosOpen(env);
 | 
			
		||||
    } else {
 | 
			
		||||
       env.put(Context.SECURITY_PRINCIPAL, username);
 | 
			
		||||
       env.put(Context.SECURITY_CREDENTIALS, password != null ? password : "");
 | 
			
		||||
       return new InitialDirContext(env);
 | 
			
		||||
      if (username != null) {
 | 
			
		||||
        env.put(Context.SECURITY_PRINCIPAL, username);
 | 
			
		||||
        env.put(Context.SECURITY_CREDENTIALS, password != null ? password : "");
 | 
			
		||||
      }
 | 
			
		||||
      return new InitialDirContext(env);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user