mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Escape special chars before using auth in sed replace clause (#12992)
Signed-off-by: Yann Weyer <ykweyer@users.noreply.github.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
d0f5fc85be
commit
5379d141cc
@@ -5,7 +5,7 @@ keywords:
|
||||
- redis
|
||||
- keyvalue
|
||||
- database
|
||||
version: 3.3.4
|
||||
version: 3.3.5
|
||||
appVersion: 5.0.3
|
||||
description: Highly available Kubernetes implementation of Redis
|
||||
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
|
||||
|
||||
@@ -130,7 +130,8 @@ data:
|
||||
|
||||
if [ "${AUTH:-}" ]; then
|
||||
echo "Setting auth values"
|
||||
sed -i "s/replace-default-auth/$AUTH/" "$REDIS_CONF" "$SENTINEL_CONF"
|
||||
ESCAPED_AUTH=$(echo "$AUTH" | sed -e 's/[\/&]/\\&/g');
|
||||
sed -i "s/replace-default-auth/${ESCAPED_AUTH}/" "$REDIS_CONF" "$SENTINEL_CONF"
|
||||
fi
|
||||
|
||||
echo "Ready..."
|
||||
|
||||
Reference in New Issue
Block a user