summaryrefslogtreecommitdiffstats
path: root/model/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/user.go')
-rw-r--r--model/user.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/model/user.go b/model/user.go
index f983139f9..48d85526d 100644
--- a/model/user.go
+++ b/model/user.go
@@ -36,6 +36,7 @@ const (
USER_AUTH_DATA_MAX_LENGTH = 128
USER_NAME_MAX_LENGTH = 64
USER_NAME_MIN_LENGTH = 1
+ USER_PASSWORD_MAX_LENGTH = 72
)
type User struct {
@@ -130,7 +131,7 @@ func (u *User) IsValid() *AppError {
return InvalidUserError("auth_data_pwd", u.Id)
}
- if len(u.Password) > 72 {
+ if len(u.Password) > USER_PASSWORD_MAX_LENGTH {
return InvalidUserError("password_limit", u.Id)
}