2
0
mirror of https://github.com/deajan/osync synced 2024-11-03 15:40:14 +00:00

Imported funny _REMOTE_TOKEN obfuscation from obackup :)

This commit is contained in:
deajan 2017-02-10 11:14:11 +01:00
parent 8c40e0c950
commit 81438ce2fd

View File

@ -3,7 +3,7 @@
#### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.1-RC2+dev
_OFUNCTIONS_BUILD=2017020901
_OFUNCTIONS_BUILD=2017021003
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -234,6 +234,10 @@ function Logger {
prefix=""
fi
## 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/__(o_O)__}"
if [ "$level" == "CRITICAL" ]; then
_Logger "$prefix($level):$value" "$prefix\e[1;33;41m$value\e[0m" true
ERROR_ALERT=true