mirror of
https://github.com/bitnami/containers.git
synced 2026-10-10 00:39:44 +02:00
[bitnami/valkey-cluster] Fix valkey_conf_set stripping dashes from values (#95159)
This commit is contained in:
@@ -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\""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user