[bitnami/valkey-cluster] Fix valkey_conf_set stripping dashes from values (#95159)

This commit is contained in:
Francisco Jiménez Cabrera
2026-07-08 11:09:37 +02:00
committed by GitHub
parent 846fcb1ced
commit 23b3efed68
@@ -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\""