1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

feat: add user password constraints (#6945)

* feat: add user password length constraints

* add password length changes in locale files

* revert maximum password length changes

* add tests

* fix lint

* fix lint and test

* fix tests

* Revert "add password length changes in locale files"

This reverts commit eaaf63ba7c.

* Update PR

---------

Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
Shalabh Agarwal 2025-09-10 20:21:04 +05:30 committed by GitHub
parent eedfb8b0a2
commit efa32646ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 195 additions and 76 deletions

View file

@ -397,6 +397,15 @@ class ServerConfigManager {
nsfwFlagsSettings: {
enabled: CONFIG.NSFW_FLAGS_SETTINGS.ENABLED
},
fieldsConstraints: {
users: {
password: {
minLength: CONSTRAINTS_FIELDS.USERS.PASSWORD.min,
maxLength: CONSTRAINTS_FIELDS.USERS.PASSWORD.max
}
}
}
}
}
@ -423,7 +432,7 @@ class ServerConfigManager {
minimumAge: CONFIG.SIGNUP.MINIMUM_AGE,
requiresApproval: CONFIG.SIGNUP.REQUIRES_APPROVAL,
requiresEmailVerification: CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION
}
} satisfies ServerConfig['signup']
const htmlConfig = await this.getHTMLServerConfig()