From 9412107b53ffbd576df7508fc937e55ac76177d8 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 6 Jul 2013 17:38:23 +0200 Subject: [PATCH] Hard coded block limit for pool statistics This should fix a potential DoS like attack when fetching a random amount of blocks continously. Fixes #387 --- public/include/pages/statistics/blocks.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/pages/statistics/blocks.inc.php b/public/include/pages/statistics/blocks.inc.php index c65ea861..6c3b00b8 100644 --- a/public/include/pages/statistics/blocks.inc.php +++ b/public/include/pages/statistics/blocks.inc.php @@ -5,7 +5,7 @@ if (!defined('SECURITY')) die('Hacking attempt'); if (!$user->isAuthenticated()) header("Location: index.php?page=home"); // Grab the last blocks found -empty($_REQUEST['limit']) ? $iLimit = 20 : $iLimit = $_REQUEST['limit']; +$iLimit = 20; $aBlocksFoundData = $statistics->getBlocksFound($iLimit); // Propagate content our template