mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 09:43:01 -06: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
|
|
@ -54,7 +54,7 @@ func (suite *ChangePasswordTestSuite) TestChangePasswordIncorrectOld() {
|
|||
user := suite.testUsers["local_account_1"]
|
||||
|
||||
errWithCode := suite.user.PasswordChange(context.Background(), user, "ooooopsydoooopsy", "verygoodnewpassword")
|
||||
suite.EqualError(errWithCode, "crypto/bcrypt: hashedPassword is not the hash of the given password")
|
||||
suite.EqualError(errWithCode, "PasswordChange: crypto/bcrypt: hashedPassword is not the hash of the given password")
|
||||
suite.Equal(http.StatusUnauthorized, errWithCode.Code())
|
||||
suite.Equal("Unauthorized: old password was incorrect", errWithCode.Safe())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue