From 5fd199ae8ade3cfad2ab1c2cd373df05ce52fbe2 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 6 Sep 2014 02:39:54 -0400 Subject: [PATCH] check privs pids --- src/privileges/posts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/privileges/posts.js b/src/privileges/posts.js index f68a235866..b630014705 100644 --- a/src/privileges/posts.js +++ b/src/privileges/posts.js @@ -2,6 +2,7 @@ 'use strict'; var async = require('async'), + winston = require('winston'), posts = require('../posts'), topics = require('../topics'), @@ -15,7 +16,10 @@ module.exports = function(privileges) { privileges.posts = {}; privileges.posts.get = function(pids, uid, callback) { - + if (pids && pids.length > 100) { + var e = new Error('too many keys') + winston.warn('[TOO_MANY_KEYS] ' + pid.length, e.stack); + } async.parallel({ manage_content: function(next) { helpers.hasEnoughReputationFor('privileges:manage_content', uid, next);