From 23b3efed681445ea9df77298d38f6e6281480e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jim=C3=A9nez=20Cabrera?= Date: Wed, 8 Jul 2026 10:09:37 +0100 Subject: [PATCH] [bitnami/valkey-cluster] Fix valkey_conf_set stripping dashes from values (#95159) --- .../9.1/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bitnami/valkey-cluster/9.1/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh b/bitnami/valkey-cluster/9.1/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh index 3b10dc9e6d3d..b9bca7f94031 100644 --- a/bitnami/valkey-cluster/9.1/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh +++ b/bitnami/valkey-cluster/9.1/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh @@ -54,9 +54,11 @@ valkey_conf_set() { value="${value//\\/\\\\}" value="${value//&/\\&}" value="${value//\?/\\?}" - # 2. \000-\037 strips all ASCII control characters (0-31) + # 2. \001-\037 strips all ASCII control characters (1-31) + # NUL is excluded: Bash cannot store it, so including it turns the range + # into a literal '-' that would strip dashes from the value # 3. \177 strips DEL (delete) character (127) - value="${value//[$'\000'-$'\037'$'\177']}" + value="${value//[$'\001'-$'\037'$'\177']}" # 4. If the value is empty, set it to an empty string [[ "$value" = "" ]] && value="\"$value\""