diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-10-20 14:04:14 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-10-20 14:04:14 -0400 |
commit | 8b4771a6c7260558dcffed4e37e978be35920dc3 (patch) | |
tree | f2926b71f2e5b8a312778e5f0471bee1f83aa1f0 /model | |
parent | 4ed9a9ebca82659572af976a7ef9819c4ea63bb8 (diff) | |
parent | b8eb11a4393779bd3a04ee3b0f13cb3e00806761 (diff) | |
download | chat-8b4771a6c7260558dcffed4e37e978be35920dc3.tar.gz chat-8b4771a6c7260558dcffed4e37e978be35920dc3.tar.bz2 chat-8b4771a6c7260558dcffed4e37e978be35920dc3.zip |
Merge branch 'release-1.1.0'
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/model/config.go b/model/config.go index ef76877c2..3a39df2f1 100644 --- a/model/config.go +++ b/model/config.go @@ -185,8 +185,8 @@ func (o *Config) IsValid() *AppError { return NewAppError("Config.IsValid", "Invalid maximum users per team for team settings. Must be a positive number.", "") } - if len(o.SqlSettings.AtRestEncryptKey) != 32 { - return NewAppError("Config.IsValid", "Invalid at rest encrypt key for SQL settings. Must be 32 chars.", "") + if len(o.SqlSettings.AtRestEncryptKey) < 32 { + return NewAppError("Config.IsValid", "Invalid at rest encrypt key for SQL settings. Must be 32 chars or more.", "") } if !(o.SqlSettings.DriverName == DATABASE_DRIVER_MYSQL || o.SqlSettings.DriverName == DATABASE_DRIVER_POSTGRES) { @@ -233,20 +233,20 @@ func (o *Config) IsValid() *AppError { return NewAppError("Config.IsValid", "Invalid thumbnail width for file settings. Must be a positive number.", "") } - if len(o.FileSettings.PublicLinkSalt) != 32 { - return NewAppError("Config.IsValid", "Invalid public link salt for file settings. Must be 32 chars.", "") + if len(o.FileSettings.PublicLinkSalt) < 32 { + return NewAppError("Config.IsValid", "Invalid public link salt for file settings. Must be 32 chars or more.", "") } if !(o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_TLS || o.EmailSettings.ConnectionSecurity == CONN_SECURITY_STARTTLS) { return NewAppError("Config.IsValid", "Invalid connection security for email settings. Must be '', 'TLS', or 'STARTTLS'", "") } - if len(o.EmailSettings.InviteSalt) != 32 { - return NewAppError("Config.IsValid", "Invalid invite salt for email settings. Must be 32 chars.", "") + if len(o.EmailSettings.InviteSalt) < 32 { + return NewAppError("Config.IsValid", "Invalid invite salt for email settings. Must be 32 chars or more.", "") } - if len(o.EmailSettings.PasswordResetSalt) != 32 { - return NewAppError("Config.IsValid", "Invalid password reset salt for email settings. Must be 32 chars.", "") + if len(o.EmailSettings.PasswordResetSalt) < 32 { + return NewAppError("Config.IsValid", "Invalid password reset salt for email settings. Must be 32 chars or more.", "") } if o.RateLimitSettings.MemoryStoreSize <= 0 { |