SC2162: read without -r mangle backslashes

This commit is contained in:
Jose Diaz-Gonzalez
2017-03-26 04:59:10 -06:00
parent ed7d5623ad
commit e2bbdc968d
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ verify_ssh_key_file() {
declare desc="Test that public key is valid"
[[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
local key line=0
while read key ; do
while read -r key; do
line=$((line + 1))
ssh-keygen -l -f /dev/stdin <<< "$key" &> /dev/null || dokku_log_fail "${DOKKU_ROOT}/.ssh/authorized_keys line $line failed ssh-keygen check."
done <"${DOKKU_ROOT}/.ssh/authorized_keys"