GUACAMOLE-422: Add timezone instruction to handshake, remove kludge from JDBC module.

This commit is contained in:
Virtually Nick
2019-03-24 21:58:38 -04:00
parent 5ac98e441c
commit d194e0754f
2 changed files with 7 additions and 9 deletions

View File

@@ -476,15 +476,6 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
activeConnections.put(connection.getIdentifier(), activeConnection); activeConnections.put(connection.getIdentifier(), activeConnection);
activeConnectionGroups.put(connection.getParentIdentifier(), activeConnection); activeConnectionGroups.put(connection.getParentIdentifier(), activeConnection);
config = getGuacamoleConfiguration(activeConnection.getUser(), connection); config = getGuacamoleConfiguration(activeConnection.getUser(), connection);
// If timezone is provided by tunnel parameter, and not
// overriden by connection parameter, set it.
String tzTunnel = info.getTimezone();
String tzParam = config.getParameter("timezone");
if ((tzParam == null || tzParam.isEmpty())
&& tzTunnel != null && !tzTunnel.isEmpty())
config.setParameter("timezone", tzTunnel);
} }
// If we ARE joining an active connection, generate a configuration // If we ARE joining an active connection, generate a configuration

View File

@@ -184,6 +184,13 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
"image", "image",
info.getImageMimetypes().toArray(new String[0]) info.getImageMimetypes().toArray(new String[0])
)); ));
// Send client timezone
writer.writeInstruction(
new GuacamoleInstruction(
"timezone",
info.getTimezone()
));
// Send args // Send args
writer.writeInstruction(new GuacamoleInstruction("connect", arg_values)); writer.writeInstruction(new GuacamoleInstruction("connect", arg_values));