nixos/users-groups: do not check validity of empty hashes

This commit is contained in:
rnhmjoj 2020-06-21 17:01:34 +02:00
parent 900ae97569
commit 751c2ed6e4
No known key found for this signature in database
GPG key ID: BFBAF4C975F76450

View file

@ -629,7 +629,8 @@ in {
content = "${base64}${sep}${base64}";
mcf = "^${sep}${scheme}${sep}${content}$";
in
if (user.hashedPassword != null
if (user.hashedPassword != null # login disabled
&& user.hashedPassword != "" # login without password
&& builtins.match mcf user.hashedPassword == null)
then
''