mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Ticket
This commit is contained in:
@@ -117,6 +117,7 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
|||||||
public MySQLAuthenticationProvider() throws GuacamoleException {
|
public MySQLAuthenticationProvider() throws GuacamoleException {
|
||||||
|
|
||||||
final Properties myBatisProperties = new Properties();
|
final Properties myBatisProperties = new Properties();
|
||||||
|
final Properties driverProperties = new Properties();
|
||||||
|
|
||||||
// Set the mysql properties for MyBatis.
|
// Set the mysql properties for MyBatis.
|
||||||
myBatisProperties.setProperty("mybatis.environment.id", "guacamole");
|
myBatisProperties.setProperty("mybatis.environment.id", "guacamole");
|
||||||
@@ -126,6 +127,7 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
|||||||
myBatisProperties.setProperty("JDBC.username", GuacamoleProperties.getRequiredProperty(MySQLGuacamoleProperties.MYSQL_USERNAME));
|
myBatisProperties.setProperty("JDBC.username", GuacamoleProperties.getRequiredProperty(MySQLGuacamoleProperties.MYSQL_USERNAME));
|
||||||
myBatisProperties.setProperty("JDBC.password", GuacamoleProperties.getRequiredProperty(MySQLGuacamoleProperties.MYSQL_PASSWORD));
|
myBatisProperties.setProperty("JDBC.password", GuacamoleProperties.getRequiredProperty(MySQLGuacamoleProperties.MYSQL_PASSWORD));
|
||||||
myBatisProperties.setProperty("JDBC.autoCommit", "false");
|
myBatisProperties.setProperty("JDBC.autoCommit", "false");
|
||||||
|
driverProperties.setProperty("characterEncoding","UTF-8");
|
||||||
|
|
||||||
// Set up Guice injector.
|
// Set up Guice injector.
|
||||||
injector = Guice.createInjector(
|
injector = Guice.createInjector(
|
||||||
@@ -135,6 +137,9 @@ public class MySQLAuthenticationProvider implements AuthenticationProvider {
|
|||||||
@Override
|
@Override
|
||||||
public void configure(Binder binder) {
|
public void configure(Binder binder) {
|
||||||
Names.bindProperties(binder, myBatisProperties);
|
Names.bindProperties(binder, myBatisProperties);
|
||||||
|
binder.bind(Properties.class)
|
||||||
|
.annotatedWith(Names.named("JDBC.driverProperties"))
|
||||||
|
.toInstance(driverProperties);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -92,6 +92,9 @@ public class List extends AuthenticatingHttpServlet {
|
|||||||
|
|
||||||
// Write XML content type
|
// Write XML content type
|
||||||
response.setHeader("Content-Type", "text/xml");
|
response.setHeader("Content-Type", "text/xml");
|
||||||
|
|
||||||
|
// Set encoding
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
// Get connection directory
|
// Get connection directory
|
||||||
Directory<String, Connection> directory = context.getConnectionDirectory();
|
Directory<String, Connection> directory = context.getConnectionDirectory();
|
||||||
|
@@ -101,6 +101,9 @@ public class List extends AuthenticatingHttpServlet {
|
|||||||
|
|
||||||
// Do not cache
|
// Do not cache
|
||||||
response.setHeader("Cache-Control", "no-cache");
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
|
||||||
|
// Set encoding
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
// Write actual XML
|
// Write actual XML
|
||||||
try {
|
try {
|
||||||
|
@@ -199,6 +199,9 @@ public class List extends AuthenticatingHttpServlet {
|
|||||||
|
|
||||||
// Do not cache
|
// Do not cache
|
||||||
response.setHeader("Cache-Control", "no-cache");
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
|
||||||
|
// Set encoding
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
// Map of all available protocols
|
// Map of all available protocols
|
||||||
Map<String, ProtocolInfo> protocols = new HashMap<String, ProtocolInfo>();
|
Map<String, ProtocolInfo> protocols = new HashMap<String, ProtocolInfo>();
|
||||||
|
@@ -50,6 +50,9 @@ public class List extends AuthenticatingHttpServlet {
|
|||||||
|
|
||||||
// Write XML content type
|
// Write XML content type
|
||||||
response.setHeader("Content-Type", "text/xml");
|
response.setHeader("Content-Type", "text/xml");
|
||||||
|
|
||||||
|
// Set encoding
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
// Write actual XML
|
// Write actual XML
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user