mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add limit to Props size in Post table
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user