Correction erreur vérification sha-256
This commit is contained in:
parent
042932c2f9
commit
d0412d6ab7
@ -64,10 +64,11 @@ fi
|
|||||||
for userinfo in ${userfile}; do
|
for userinfo in ${userfile}; do
|
||||||
user=$(echo "${userinfo}" | cut -d ';' -f 1)
|
user=$(echo "${userinfo}" | cut -d ';' -f 1)
|
||||||
is_bastion=$(echo "${userinfo}" | cut -d ';' -f 2)
|
is_bastion=$(echo "${userinfo}" | cut -d ';' -f 2)
|
||||||
encrypted_password=$(echo "${userinfo}" | cut -d ';' -f 3)
|
encrypted_password=$(echo "${userinfo}" | cut -d ';' -f 3 | sed 's/\$/\\$/g')
|
||||||
setkeys=$(echo "${userinfo}" | cut -d ';' -f 4)
|
setkeys=$(echo "${userinfo}" | cut -d ';' -f 4)
|
||||||
|
|
||||||
if [[ $(echo "${encrypted_password}" | cut -c1-3) != "$6$" ]] || [[ $(echo "${encrypted_password}" | cut -c1-1) -ne "0" ]]; then
|
# shellcheck disable=SC2016
|
||||||
|
if [[ $(echo "${encrypted_password}" | cut -c1-3) != '$6$' ]] && [[ $(echo "${encrypted_password}" | cut -c1-1) != '0' ]]; then
|
||||||
error_msg "Code 01 : Problème avec le mot de passe entré pour l'utilisateur \"${user}\".\nConsultez la documentation pour plus d'informations."
|
error_msg "Code 01 : Problème avec le mot de passe entré pour l'utilisateur \"${user}\".\nConsultez la documentation pour plus d'informations."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user