Skip to content

Commit 86e6a1a

Browse files
pditommasoclaude
andcommitted
[release] Fix URI validation in JedisPoolFactory
Move URI validation to the beginning of createRedisPool() before calling JedisURIHelper methods that would throw NPE for invalid URIs (e.g., 'localhost:6379' without scheme). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5b551c7 commit 86e6a1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib-jedis-pool/src/main/java/io/seqera/jedis/JedisPoolFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public JedisPool createRedisPool(
6565
@Nullable @Value("${redis.password}") String password
6666
) {
6767
final URI uri = URI.create(connection);
68+
if (!JedisURIHelper.isValid(uri)) {
69+
throw new InvalidURIException("Invalid Redis connection URI: " + uri);
70+
}
6871
final int database = JedisURIHelper.getDBIndex(uri);
6972

7073
log.info("Creating Redis pool - uri={}; database={}; minIdle={}; maxIdle={}; maxTotal={}; timeout={}",

0 commit comments

Comments
 (0)