Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/304#discussion_r197516534
--- 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 --
If `null` is a legitimate return value for this function, that value should
be documented and will need to be properly handled by callers of the function.
Searching through the code, I see this function invoked as part of a call
to `setAttributes()` as defined by the `Attributes` interface, but that
function does not have defined behavior for a `null` parameter:
https://github.com/apache/guacamole-client/blob/a9637494ac35136fb8ce3d02c0d14eadb643fb52/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Attributes.java#L54-L55
---