forked from proxmox-mirrors/proxmox
api: enforce minimum character limit of 8 on new passwords
we already have two different password schemas, `PBS_PASSWORD_SCHEMA` being the stricter one, which ensures a minimum length of new passwords. however, this wasn't used on the change password endpoint before, so add it there too. this is also in-line with NIST's latest recommendations [1]. [1]: https://pages.nist.gov/800-63-4/sp800-63b.html#passwordver Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
parent
6e3c5afce5
commit
b51b0be153
@ -214,7 +214,7 @@ pub const OPENSSL_CIPHERS_TLS_1_3_SCHEMA: Schema =
|
||||
|
||||
pub const PBS_PASSWORD_SCHEMA: Schema = StringSchema::new("User Password.")
|
||||
.format(&PASSWORD_FORMAT)
|
||||
.min_length(5)
|
||||
.min_length(8)
|
||||
.max_length(64)
|
||||
.schema();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user