GUACAMOLE-1656: Check if user KSM config is null before constructing a client.

This commit is contained in:
James Muehlner
2022-09-29 03:12:13 +00:00
parent 6c43611f51
commit b8d2a9edc1

View File

@@ -163,7 +163,7 @@ public class KsmSecretService implements VaultSecretService {
// If the user config happens to be the same as admin-defined one, // If the user config happens to be the same as admin-defined one,
// don't bother trying again // don't bother trying again
if (!Objects.equal(userKsmConfig, ksmConfig)) if (userKsmConfig != null && !Objects.equal(userKsmConfig, ksmConfig))
return getClient(userKsmConfig).getSecret(name); return getClient(userKsmConfig).getSecret(name);
return CompletableFuture.completedFuture(null); return CompletableFuture.completedFuture(null);