php-mpos/public/include/pages/statistics/blocks.inc.php
Sebastian Grewe 9412107b53 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
2013-07-06 17:38:23 +02:00

17 lines
447 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
if (!$user->isAuthenticated()) header("Location: index.php?page=home");
// Grab the last blocks found
$iLimit = 20;
$aBlocksFoundData = $statistics->getBlocksFound($iLimit);
// Propagate content our template
$smarty->assign("BLOCKSFOUND", $aBlocksFoundData);
$smarty->assign("BLOCKLIMIT", $iLimit);
$smarty->assign("CONTENT", "default.tpl");
?>