mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 05:52:24 -05:00
[chore] Admin CLI + new account creation refactoring (#2008)
* set maxPasswordLength to 72 bytes, rename validate function * refactor NewSignup * refactor admin account CLI commands * refactor oidc create user * refactor processor create * tweak password change, check old != new password
This commit is contained in:
parent
f8f0312042
commit
5a29a031ad
11 changed files with 373 additions and 276 deletions
|
|
@ -46,9 +46,9 @@ const (
|
|||
maximumListTitleLength = 200
|
||||
)
|
||||
|
||||
// NewPassword returns a helpful error if the given password
|
||||
// Password returns a helpful error if the given password
|
||||
// is too short, too long, or not sufficiently strong.
|
||||
func NewPassword(password string) error {
|
||||
func Password(password string) error {
|
||||
// Ensure length is OK first.
|
||||
if pwLen := len(password); pwLen == 0 {
|
||||
return errors.New("no password provided / provided password was 0 bytes")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue