mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
protection
This commit is contained in:
parent
c747bd54ae
commit
500b05cc7e
@ -72,6 +72,8 @@ $config['per_page'] = 10;
|
||||
**/
|
||||
$config['private_only'] = false;
|
||||
$config['enable_captcha'] = false;
|
||||
$config['spamadmin_user'] = '';
|
||||
$config['spamadmin_pass'] = '';
|
||||
|
||||
/**
|
||||
* Default language
|
||||
|
@ -15,6 +15,17 @@ class Spamadmin extends CI_Controller
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//protection
|
||||
$user = $this->config->item('spamadmin_user');
|
||||
$pass = $this->config->item('spamadmin_pass');
|
||||
|
||||
if ($user == '' || $pass == '' || !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $user || $_SERVER['PHP_AUTH_PW'] != $pass)
|
||||
{
|
||||
header('WWW-Authenticate: Basic realm="Backup"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
|
Loading…
x
Reference in New Issue
Block a user