checked number before parseInt

This commit is contained in:
Spiritlebon
2014-10-12 04:01:35 +02:00
parent 35fc175ff6
commit 2b15de63c0

View File

@@ -404,7 +404,7 @@ SocketTopics.follow = function(socket, tid, callback) {
};
SocketTopics.loadMore = function(socket, data, callback) {
if(!data || !data.tid || (parseInt(data.after, 10) < 0)) {
if(!data || !data.tid || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0) {
return callback(new Error('[[error:invalid-data]]'));
}