From 1c1fac700c935feba4b51639d83af8cf6718862b Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 6 Jun 2019 13:59:52 -0700 Subject: [PATCH] GUACAMOLE-807: Correct handling of parameter tokens within LDAP. Parameter tokens are intended to be interpreted by the connections stored within LDAP. This was previously done through explicitly using a TokenFilter and the StandardTokens class, however usage of StandardTokens is now deprecated and the values of tokens to be applied are now expected to be received through connect(). Usage of StandardTokens was removed from LDAP with commit 1210d56, but this is insufficient. An additional parameter must also be provided to the SimpleConnection constructor to enable its automatic token handling behavior. --- .../guacamole/auth/ldap/connection/ConnectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java index 6a96d5be4..2f2b67480 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java @@ -178,7 +178,7 @@ public class ConnectionService { // Store connection using cn for both identifier and name String name = cn.getStringValue(); - Connection connection = new SimpleConnection(name, name, config); + Connection connection = new SimpleConnection(name, name, config, true); connection.setParentIdentifier(LDAPAuthenticationProvider.ROOT_CONNECTION_GROUP); // Inject LDAP-specific tokens only if LDAP handled user