You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/03/21 17:47:26 UTC
[02/10] incubator-guacamole-client git commit: GUACAMOLE-102: Fix
issue with string comparison,
and fully check values for ldap-dereference-aliases.
GUACAMOLE-102: Fix issue with string comparison, and fully check values for ldap-dereference-aliases.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/c0a1b692
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/c0a1b692
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/c0a1b692
Branch: refs/heads/master
Commit: c0a1b692d1151162df87a2a3749e53f27833db14
Parents: 907e0ed
Author: Nick Couchman <ni...@yahoo.com>
Authored: Sun Mar 19 20:45:52 2017 -0400
Committer: Nick Couchman <ni...@yahoo.com>
Committed: Sun Mar 19 20:45:52 2017 -0400
----------------------------------------------------------------------
.../guacamole/auth/ldap/ConfigurationService.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/c0a1b692/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
index f29d8f1..e546414 100644
--- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
+++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java
@@ -241,17 +241,23 @@ public class ConfigurationService {
"never"
);
- if (derefAliases == "always")
+ if (derefAliases.equals("always"))
return 3;
- else if (derefAliases == "finding")
+ else if (derefAliases.equals("finding"))
return 2;
- else if (derefAliases == "searching")
+ else if (derefAliases.equals("searching"))
return 1;
- else
+ else if (derefAliases.equals("never"))
return 0;
+
+ else {
+ logger.error("Invalid value given for ldap-dereference-aliases.");
+ logger.debug("Received {} but expected one of the following: always, finding, searching, never.", derefAliases);
+ throw new GuacamoleException("Invalid valid for ldap-dereference-aliases.");
+ }
}