Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/guacamole-client/pull/304#discussion_r197594334
  
    --- Diff: 
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java
 ---
    @@ -283,7 +284,12 @@ public AuthenticatedUser authenticateUser(Credentials 
credentials)
             try {
                 // Get LDAP attributes by querying LDAP
                 LDAPEntry userEntry = ldapConnection.read(userDN, attrArray);
    +            if (userEntry == null)
    +                return null;
    --- End diff --
    
    I chased down one of the other implementations of the `Attributes` 
interface and it wasn't much help in determining the best way to go, here.  
Thoughts on whether its better to go back and define `null` behavior or return 
an empty `Map` (which I'm guessing is the other option)?
    
    FWIW the code in the `TokenFilter` class that uses it does check for `null` 
values before trying to use it, so it's "safe" that way, but the point is 
well-taken that just because that code uses it safely doesn't mean that we 
should assume every instance of it will use the same care.


---

Reply via email to