Merge pull request #1108 from schurzi/rounds

[AUTH-9229] resolve inconsistency with AUTH-9230
This commit is contained in:
Michael Boelen 2021-04-01 13:44:17 +02:00 committed by GitHub
commit a8f7b0cb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,12 +294,12 @@
# disabled | shadowed | no password | locked account (can be literal *LOCK* or something like LOCKED)
;;
*:\$5\$*| *:\$6\$*)
# sha256crypt | sha512crypt: check number of rounds, should be >5000
# sha256crypt | sha512crypt: check number of rounds, should be >=5000
ROUNDS=$(echo "${METHOD}" | sed -n 's/.*rounds=\([0-9]*\)\$.*/\1/gp')
if [ -z "${ROUNDS}" ]; then
echo 'sha256crypt/sha512crypt(default<=5000rounds)'
elif [ "${ROUNDS}" -le 5000 ]; then
echo 'sha256crypt/sha512crypt(<=5000rounds)'
echo 'sha256crypt/sha512crypt(default=5000rounds)'
elif [ "${ROUNDS}" -lt 5000 ]; then
echo 'sha256crypt/sha512crypt(<5000rounds)'
fi
;;
*:\$y\$* | *:\$gy\$* | *:\$2b\$* | *:\$7\$*)