Skip to content

Commit

Permalink
DBZ-7646 allowing connection to unsecured Redis database
Browse files Browse the repository at this point in the history
  • Loading branch information
eizners committed Mar 14, 2024
1 parent 71256cf commit 5aee7b3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.slf4j.LoggerFactory;

import io.debezium.DebeziumException;

import io.debezium.util.Strings;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.Jedis;
Expand Down Expand Up @@ -81,10 +81,10 @@ public RedisClient getRedisClient(String clientName, boolean waitEnabled, long w
client = new Jedis(address, DefaultJedisClientConfig.builder().database(this.dbIndex).connectionTimeoutMillis(this.connectionTimeout)
.socketTimeoutMillis(this.socketTimeout).ssl(this.sslEnabled).build());

if (this.user != null) {
if (!Strings.isNullOrEmpty(this.user)) {
client.auth(this.user, this.password);
}
else if (this.password != null) {
else if (!Strings.isNullOrEmpty(this.password)) {
client.auth(this.password);
}
else {
Expand Down

0 comments on commit 5aee7b3

Please sign in to comment.