mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-24 12:59:24 -05:00
Hide password in userdata parser
Replace password in log output with asterisks Fixes #362 ## Results: Before: `[bash] Parsing user data: "user:abc!123:3000:4000:/user/home"` After: `[bash] Parsing user data: "user:******:3000:4000:/user/home"`
This commit is contained in:
parent
eacf693131
commit
a30b27bb40
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ function validateArg() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
log "Parsing user data: \"$1\""
|
# Replace password in log output with asterisks
|
||||||
|
log "Parsing user data: \"$(echo "$1" | cut -d: -f1,3- | sed -e '1,/:/{s/:/:******:/}')\""
|
||||||
IFS=':' read -ra args <<< "$1"
|
IFS=':' read -ra args <<< "$1"
|
||||||
|
|
||||||
skipIndex=0
|
skipIndex=0
|
||||||
|
|
Loading…
Reference in a new issue