diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2015-12-03 14:36:51 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2015-12-03 14:36:51 -0500 |
commit | 3e455959c62a094911d7b435d46627f8c37a3394 (patch) | |
tree | 0f55f70ac840d518f9a39847ed5e8737ad519e4d /model/post.go | |
parent | a598427d6cb5b97f963fb717845e40d65064f1ae (diff) | |
parent | cc111205f9c6cb152ca87f68c0a2f7aa519fdf59 (diff) | |
download | chat-3e455959c62a094911d7b435d46627f8c37a3394.tar.gz chat-3e455959c62a094911d7b435d46627f8c37a3394.tar.bz2 chat-3e455959c62a094911d7b435d46627f8c37a3394.zip |
Merge pull request #1598 from mattermost/plt-1079
PLT-1079 Add limit to Props size in Post table
Diffstat (limited to 'model/post.go')
-rw-r--r-- | model/post.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/model/post.go b/model/post.go index 5578514b5..e66009dd6 100644 --- a/model/post.go +++ b/model/post.go @@ -112,6 +112,10 @@ func (o *Post) IsValid() *AppError { return NewAppError("Post.IsValid", "Invalid filenames", "id="+o.Id) } + if utf8.RuneCountInString(StringInterfaceToJson(o.Props)) > 8000 { + return NewAppError("Post.IsValid", "Invalid props", "id="+o.Id) + } + return nil } |