Merge pull request #224418 from jtojnar/users-validate-passwords-with-options

nixos/users-groups: Fix password scheme validation
This commit is contained in:
Martin Weinelt 2023-04-03 02:28:07 +02:00 committed by GitHub
commit 814401390c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -733,8 +733,9 @@ in {
sep = "\\$";
base64 = "[a-zA-Z0-9./]+";
id = cryptSchemeIdPatternGroup;
name = "[a-z0-9-]+";
value = "[a-zA-Z0-9/+.-]+";
options = "${id}(=${value})?(,${id}=${value})*";
options = "${name}(=${value})?(,${name}=${value})*";
scheme = "${id}(${sep}${options})?";
content = "${base64}${sep}${base64}(${sep}${base64})?";
mcf = "^${sep}${scheme}${sep}${content}$";