Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-7646 Support empty or null user/passwords with Redis connections #5387

Merged
merged 1 commit into from Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -11,6 +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;
Expand Down Expand Up @@ -81,10 +82,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