diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 6d4de47de..e1feed6b1 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -378,16 +378,18 @@ ynh_secure_remove () { ynh_get_plain_key() { local prefix="#" local founded=0 - local key=$1 + # We call this key_ so that it's not caught as + # an info to be redacted by the core + local key_=$1 shift while read line; do if [[ "$founded" == "1" ]] ; then [[ "$line" =~ ^${prefix}[^#] ]] && return echo $line - elif [[ "$line" =~ ^${prefix}${key}$ ]]; then + elif [[ "$line" =~ ^${prefix}${key_}$ ]]; then if [[ -n "${1:-}" ]]; then prefix+="#" - key=$1 + key_=$1 shift else founded=1