lib1/2 update
This commit is contained in:
@@ -230,7 +230,9 @@
|
||||
|
||||
// require SSL for SOAP access
|
||||
$opt['page']['nusoap_require_https'] = false;
|
||||
|
||||
|
||||
// block troublemakers
|
||||
$opt['page']['banned_user_agents'] = array();
|
||||
|
||||
/*
|
||||
* configure infos on 404.php
|
||||
|
||||
@@ -52,6 +52,12 @@
|
||||
require_once($opt['rootpath'] . 'lib/consts.inc.php');
|
||||
require_once($opt['rootpath'] . 'lib2/errorhandler.inc.php');
|
||||
|
||||
// check for banned UAs
|
||||
$useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
|
||||
foreach ($opt['page']['banned_user_agents'] as $ua)
|
||||
if (strpos($useragent, $ua) !== false)
|
||||
die();
|
||||
|
||||
// basic PHP settings
|
||||
date_default_timezone_set($timezone);
|
||||
if ($debug_page)
|
||||
|
||||
@@ -122,6 +122,9 @@
|
||||
*/
|
||||
$opt['page']['max_logins_per_hour'] = 1000; // for development ...
|
||||
|
||||
// block troublemakers
|
||||
$opt['page']['banned_user_agents'] = array();
|
||||
|
||||
// copy of config2/settings-dist.inc.php
|
||||
/* pregenerated waypoint list for new caches
|
||||
* - Waypoint prefix (OC, OP, OZ etc.)
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
*/
|
||||
$opt['page']['max_logins_per_hour'] = 25;
|
||||
|
||||
// block troublemakers
|
||||
$opt['page']['banned_user_agents'] = array();
|
||||
|
||||
// copy of config2/settings-dist.inc.php
|
||||
/* pregenerated waypoint list for new caches
|
||||
* - Waypoint prefix (OC, OP, OZ etc.)
|
||||
|
||||
@@ -47,6 +47,10 @@ function __autoload($class_name)
|
||||
require_once($opt['rootpath'] . 'config2/settings.inc.php');
|
||||
require_once($opt['rootpath'] . 'config2/verify-settings.inc.php');
|
||||
|
||||
foreach ($opt['page']['banned_user_agents'] as $ua)
|
||||
if (strpos($useragent, $ua) !== false)
|
||||
die();
|
||||
|
||||
set_domain();
|
||||
|
||||
if (!(isset($_REQUEST['sqldebug']) && $_REQUEST['sqldebug']=='1'))
|
||||
|
||||
Reference in New Issue
Block a user