mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix legit variable getting caught as an info to be redacted by the core
This commit is contained in:
parent
46310dbb6c
commit
7e99541064
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue