Add limit to Props size in Post table

This commit is contained in:
JoramWilander
2015-12-03 11:57:20 -05:00
parent 61f90860a8
commit cc111205f9
2 changed files with 5 additions and 1 deletions

View File

@@ -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
}