1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 15:16:30 +02:00

Guard against corrupted $pref for flood timeout

This commit is contained in:
e107steved
2007-09-18 21:15:41 +00:00
parent a5e8a6a538
commit ca12f018c7

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/class2.php,v $ | $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.23 $ | $Revision: 1.24 $
| $Date: 2007-09-11 05:15:24 $ | $Date: 2007-09-18 21:15:41 $
| $Author: e107coders $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
// //
@@ -828,11 +828,14 @@ if ($pref['anon_post'] ? define("ANON", TRUE) : define("ANON", FALSE));
if (Empty($pref['newsposts']) ? define("ITEMVIEW", 15) : define("ITEMVIEW", $pref['newsposts'])); if (Empty($pref['newsposts']) ? define("ITEMVIEW", 15) : define("ITEMVIEW", $pref['newsposts']));
if ($pref['antiflood1'] == 1) { if ($pref['antiflood1'] == 1)
define('FLOODPROTECT', TRUE); {
define('FLOODTIMEOUT', $pref['antiflood_timeout']); define('FLOODPROTECT', TRUE);
}else{ define('FLOODTIMEOUT', max(varset($pref['antiflood_timeout'],10),3));
define('FLOODPROTECT', FALSE); }
else
{
define('FLOODPROTECT', FALSE);
} }
$layout = isset($layout) ? $layout : '_default'; $layout = isset($layout) ? $layout : '_default';