summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
authorLibravatar Eamonn O'Brien-Strain <e@obrain.com>2022-05-09 01:31:46 -0700
committerLibravatar GitHub <noreply@github.com>2022-05-09 10:31:46 +0200
commitb24b71c0a4ca9c86e1d5db12e9472c6ab1ecd5f5 (patch)
tree03f35f6f3fe2b2fa4cd26dae9fd820d355e16668 /internal/processing
parent[bugfix] Fix remote media pruning failing if media already gone (#548) (diff)
downloadgotosocial-b24b71c0a4ca9c86e1d5db12e9472c6ab1ecd5f5.tar.xz
[feature] Include password strength in error message when password strength is too low (#550)
* When password validation fails, return how close to enough entropy it has. * Shorter version of low-strength password error message
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/user/changepassword_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/user/changepassword_test.go b/internal/processing/user/changepassword_test.go
index 380d361d8..b88b11b3d 100644
--- a/internal/processing/user/changepassword_test.go
+++ b/internal/processing/user/changepassword_test.go
@@ -64,9 +64,9 @@ func (suite *ChangePasswordTestSuite) TestChangePasswordWeakNew() {
user := suite.testUsers["local_account_1"]
errWithCode := suite.user.ChangePassword(context.Background(), user, "password", "1234")
- suite.EqualError(errWithCode, "insecure password, try including more special characters, using lowercase letters, using uppercase letters or using a longer password")
+ suite.EqualError(errWithCode, "password is 11% strength, try including more special characters, using lowercase letters, using uppercase letters or using a longer password")
suite.Equal(http.StatusBadRequest, errWithCode.Code())
- suite.Equal("bad request: insecure password, try including more special characters, using lowercase letters, using uppercase letters or using a longer password", errWithCode.Safe())
+ suite.Equal("bad request: password is 11% strength, try including more special characters, using lowercase letters, using uppercase letters or using a longer password", errWithCode.Safe())
}
func TestChangePasswordTestSuite(t *testing.T) {