From 5ac4bdde17a44510c5f8bf860a18003e30c681a9 Mon Sep 17 00:00:00 2001 From: Ilia Date: Sat, 28 May 2022 23:09:29 +0300 Subject: [PATCH] Add `validate_password` support --- useradmin/md5-lib.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/useradmin/md5-lib.pl b/useradmin/md5-lib.pl index a2c114c57..eb7a96787 100755 --- a/useradmin/md5-lib.pl +++ b/useradmin/md5-lib.pl @@ -270,6 +270,12 @@ if (!&check_sha512()) { return 1 if ($shash && $shash eq $hash); } +# yescrypt +if (!&check_yescrypt()) { + my $shash = &encrypt_yescrypt($passwd, $hash); + return 1 if ($shash && $shash eq $hash); + } + # Some other hashing, maybe supported by crypt my $ohash = eval { crypt($passwd, $hash) }; return 1 if ($ohash && $ohash eq $hash);