mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1298: Migrate to centralized declarations of common dependencies.
This commit is contained in:
@@ -30,6 +30,13 @@
|
||||
<name>guacamole-auth-json</name>
|
||||
<url>http://guacamole.apache.org/</url>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.guacamole</groupId>
|
||||
<artifactId>guacamole-client</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<relativePath>../../</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
@@ -112,19 +119,22 @@
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject.extensions</groupId>
|
||||
<artifactId>guice-multibindings</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson for JSON support -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.2</version>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Guava Base Libraries -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Java servlet API -->
|
||||
|
@@ -19,12 +19,12 @@
|
||||
|
||||
package org.apache.guacamole.auth.json.user;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import org.codehaus.jackson.annotate.JsonIgnore;
|
||||
import org.codehaus.jackson.annotate.JsonProperty;
|
||||
|
||||
/**
|
||||
* All data associated with a particular user, as parsed from the JSON supplied
|
||||
|
@@ -19,11 +19,11 @@
|
||||
|
||||
package org.apache.guacamole.auth.json.user;
|
||||
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class UserDataDenylist {
|
||||
return false;
|
||||
|
||||
// Add to denylist only if not already present
|
||||
String signatureHex = DatatypeConverter.printHexBinary(signature);
|
||||
String signatureHex = BaseEncoding.base16().encode(signature);
|
||||
return denylist.putIfAbsent(signatureHex, data) == null;
|
||||
|
||||
}
|
||||
|
@@ -19,6 +19,8 @@
|
||||
|
||||
package org.apache.guacamole.auth.json.user;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
@@ -30,7 +32,6 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.auth.json.ConfigurationService;
|
||||
import org.apache.guacamole.auth.json.CryptoService;
|
||||
@@ -43,7 +44,6 @@ import org.apache.guacamole.net.auth.permission.ObjectPermissionSet;
|
||||
import org.apache.guacamole.net.auth.simple.SimpleDirectory;
|
||||
import org.apache.guacamole.net.auth.simple.SimpleObjectPermissionSet;
|
||||
import org.apache.guacamole.net.auth.simple.SimpleUser;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -142,7 +142,7 @@ public class UserDataService {
|
||||
// Decrypt using defined encryption key
|
||||
byte[] decrypted = cryptoService.decrypt(
|
||||
cryptoService.createEncryptionKey(confService.getSecretKey()),
|
||||
DatatypeConverter.parseBase64Binary(base64)
|
||||
BaseEncoding.base64().decode(base64)
|
||||
);
|
||||
|
||||
// Abort if decrypted value cannot possibly have a signature AND data
|
||||
|
Reference in New Issue
Block a user