From cc111205f9c6cb152ca87f68c0a2f7aa519fdf59 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 3 Dec 2015 11:57:20 -0500 Subject: Add limit to Props size in Post table --- model/post.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'model') 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 } -- cgit v1.2.3-1-g7c22