fixes logic that allowed posts beyond maximum post length if min is set to 0, @barisusakli

This commit is contained in:
Julian Lam
2017-06-28 12:25:43 -04:00
parent fd55e4ccdf
commit 3bd02d58e3
2 changed files with 2 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ require('./posts/bookmarks')(SocketPosts);
require('./posts/tools')(SocketPosts);
SocketPosts.reply = function (socket, data, callback) {
if (!data || !data.tid || !data.content) {
if (!data || !data.tid || (parseInt(meta.config.minimumPostLength, 10) !== 0 && !data.content)) {
return callback(new Error('[[error:invalid-data]]'));
}