summaryrefslogtreecommitdiffstats
path: root/cmd/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/admin.go')
-rw-r--r--cmd/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index 65a0bfb7bf..099803fbf5 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -379,6 +379,10 @@ func runChangePassword(c *cli.Context) error {
if err := initDB(ctx); err != nil {
return err
}
+ if len(c.String("password")) < setting.MinPasswordLength {
+ return fmt.Errorf("Password is not long enough. Needs to be at least %d", setting.MinPasswordLength)
+ }
+
if !pwd.IsComplexEnough(c.String("password")) {
return errors.New("Password does not meet complexity requirements")
}