Obfuscate only part of remote token env

This commit is contained in:
deajan 2019-08-08 10:37:57 +02:00
parent 08910b3895
commit 4df4c594b7
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
#### OFUNCTIONS MICRO SUBSET #### #### OFUNCTIONS MICRO SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-dev-postRC2 _OFUNCTIONS_VERSION=2.3.0-dev-postRC2
_OFUNCTIONS_BUILD=2019072301 _OFUNCTIONS_BUILD=2019080801
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -283,8 +283,8 @@ function Logger {
fi fi
## Obfuscate _REMOTE_TOKEN in logs (for ssh_filter usage only in osync and obackup) ## Obfuscate _REMOTE_TOKEN in logs (for ssh_filter usage only in osync and obackup)
value="${value/env _REMOTE_TOKEN=$_REMOTE_TOKEN/__(o_O)__}" value="${value/env _REMOTE_TOKEN=$_REMOTE_TOKEN/env _REMOTE_TOKEN=__(o_O)__}"
value="${value/env _REMOTE_TOKEN=\$_REMOTE_TOKEN/__(o_O)__}" value="${value/env _REMOTE_TOKEN=\$_REMOTE_TOKEN/env REMOTE_TOKEN=__(o_O)__}"
if [ "$level" == "CRITICAL" ]; then if [ "$level" == "CRITICAL" ]; then
_Logger "$prefix($level):$value" "$prefix\e[1;33;41m$value\e[0m" true _Logger "$prefix($level):$value" "$prefix\e[1;33;41m$value\e[0m" true