blah blah
This commit is contained in:
parent
9dcb855b34
commit
b728b680ca
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
(SECURITY == "*)WT#&YHPI^H") ? die("public/index.php -> Set a new SECURITY value to continue") : 0;
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// SHA/Scrypt check
|
// SHA/Scrypt check
|
||||||
if (empty($config['algorithm']) || $config['algorithm'] == 'scrypt') {
|
if (empty($config['algorithm']) || $config['algorithm'] == 'scrypt') {
|
||||||
@ -9,13 +8,13 @@ if (empty($config['algorithm']) || $config['algorithm'] == 'scrypt') {
|
|||||||
} else {
|
} else {
|
||||||
$config['target_bits'] = 32;
|
$config['target_bits'] = 32;
|
||||||
}
|
}
|
||||||
if ($config['strict']) {
|
|
||||||
require_once(CLASS_DIR . '/strict.class.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Default classes
|
// Default classes
|
||||||
require_once(CLASS_DIR . '/debug.class.php');
|
require_once(CLASS_DIR . '/debug.class.php');
|
||||||
require_once(INCLUDE_DIR . '/lib/KLogger.php');
|
require_once(INCLUDE_DIR . '/lib/KLogger.php');
|
||||||
|
if ($config['strict']) {
|
||||||
|
require_once(CLASS_DIR . '/strict.class.php');
|
||||||
|
}
|
||||||
require_once(INCLUDE_DIR . '/database.inc.php');
|
require_once(INCLUDE_DIR . '/database.inc.php');
|
||||||
require_once(INCLUDE_DIR . '/config/memcache_keys.inc.php');
|
require_once(INCLUDE_DIR . '/config/memcache_keys.inc.php');
|
||||||
require_once(INCLUDE_DIR . '/config/error_codes.inc.php');
|
require_once(INCLUDE_DIR . '/config/error_codes.inc.php');
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for our API
|
* Helper class for our API
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our base class that we extend our other classes from
|
* Our base class that we extend our other classes from
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bitcoin classes
|
* Bitcoin classes
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We use a wrapper class around BitcoinClient to add
|
* We use a wrapper class around BitcoinClient to add
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Block extends Base {
|
class Block extends Base {
|
||||||
protected $table = 'blocks';
|
protected $table = 'blocks';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class CSRFToken Extends Base {
|
class CSRFToken Extends Base {
|
||||||
public $valid = 0;
|
public $valid = 0;
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file defines the debug class used in this site to enable
|
* This file defines the debug class used in this site to enable
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Invitation extends Base {
|
class Invitation extends Base {
|
||||||
var $table = 'invitations';
|
var $table = 'invitations';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
(!cfip()) ? header('HTTP/1.1 401 Unauthorized') : 0;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Mail extends Base {
|
class Mail extends Base {
|
||||||
/**
|
/**
|
||||||
|
|||||||
73
public/include/classes/memcache_ad.class.php
Normal file
73
public/include/classes/memcache_ad.class.php
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
|
class MemcacheAntiDos
|
||||||
|
{
|
||||||
|
public $cache;
|
||||||
|
public static $key = 'mcad_';
|
||||||
|
public static $request_model = array(
|
||||||
|
'ident' => '',
|
||||||
|
'last_hit' => 0,
|
||||||
|
'last_flush' => 0,
|
||||||
|
'hits_since_flush' => 0
|
||||||
|
);
|
||||||
|
public $rate_limit_this_request = false;
|
||||||
|
public function __construct($config, $userORip, $request, $mcSettings) {
|
||||||
|
if (PHP_OS == 'WINNT') {
|
||||||
|
require_once('memcached.class.php');
|
||||||
|
}
|
||||||
|
$this->cache = new Memcached();
|
||||||
|
$this->cache->addServer($mcSettings['host'], $mcSettings['port']);
|
||||||
|
// set our config options
|
||||||
|
$per_page = $config['per_page'];
|
||||||
|
$flush_sec = $config['flush_seconds'];
|
||||||
|
$rate_limit = $config['rate_limit'];
|
||||||
|
unset($config);
|
||||||
|
// prep stuff we need to check this request
|
||||||
|
$key_md5 = substr(md5($userORip), 0, 4);
|
||||||
|
$request_md5 = substr(md5($request), 0, 4);
|
||||||
|
$request_key = $mcSettings['keyprefix'].self::$key.$key_md5."_".$request_md5."_".$per_page;
|
||||||
|
$request_data = $this->cache->get($request_key);
|
||||||
|
$now = time();
|
||||||
|
// check the request
|
||||||
|
if (is_array($request_data)) {
|
||||||
|
// this request key already exists, update it
|
||||||
|
$request_data['ident'] = $key_md5;
|
||||||
|
$request_data['last_hit'] = $now;
|
||||||
|
$request_data['hits_since_flush'] += 1;
|
||||||
|
// not rate limited yet, update the rest of the object
|
||||||
|
if ($request_data['hits_since_flush'] < $rate_limit) {
|
||||||
|
if (($request_data['last_flush'] + $flush_sec) <= $now || ($request_data['last_hit'] + $flush_sec) <= $now) {
|
||||||
|
// needs to be flushed
|
||||||
|
$request_data['hits_since_flush'] = 0;
|
||||||
|
$request_data['last_hit'] = 0;
|
||||||
|
$request_data['last_flush'] = $now;
|
||||||
|
// update the object
|
||||||
|
$this->cache->set($request_key, $request_data, $flush_sec);
|
||||||
|
$this->rate_limit_this_request = false;
|
||||||
|
} else {
|
||||||
|
// no flush, just update
|
||||||
|
$this->cache->set($request_key, $request_data, $flush_sec);
|
||||||
|
$this->rate_limit_this_request = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// too many hits, we should rate limit this
|
||||||
|
$this->rate_limit_this_request = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// doesn't exist for this request_key, create one
|
||||||
|
$new_data = self::$request_model;
|
||||||
|
$new_data['ident'] = $key_md5;
|
||||||
|
$new_data['last_hit'] = time();
|
||||||
|
$new_data['hits_since_flush'] = 1;
|
||||||
|
$new_data['last_flush'] = $now;
|
||||||
|
$this->cache->set($request_key, $new_data, $flush_sec);
|
||||||
|
$this->rate_limit_this_request = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function rateLimitRequest() {
|
||||||
|
return $this->rate_limit_this_request;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper class which provides compatibility between Memcached and Memcache
|
* A wrapper class which provides compatibility between Memcached and Memcache
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Monitoring extends Base {
|
class Monitoring extends Base {
|
||||||
protected $table = 'monitoring';
|
protected $table = 'monitoring';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class News extends Base {
|
class News extends Base {
|
||||||
protected $table = 'news';
|
protected $table = 'news';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Notification extends Mail {
|
class Notification extends Mail {
|
||||||
var $table = 'notifications';
|
var $table = 'notifications';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Payout Extends Base {
|
class Payout Extends Base {
|
||||||
protected $table = 'payouts';
|
protected $table = 'payouts';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class RoundStats extends Base {
|
class RoundStats extends Base {
|
||||||
private $tableTrans = 'transactions';
|
private $tableTrans = 'transactions';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Setting extends Base {
|
class Setting extends Base {
|
||||||
protected $table = 'settings';
|
protected $table = 'settings';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Share Extends Base {
|
class Share Extends Base {
|
||||||
protected $table = 'shares';
|
protected $table = 'shares';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper class used to store values transparently in memcache
|
* A wrapper class used to store values transparently in memcache
|
||||||
|
|||||||
@ -1,11 +1,110 @@
|
|||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL);
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
class SessionManager {
|
class SessionManager {
|
||||||
private $session_state = 0;
|
private $bind_address = '';
|
||||||
|
private $started = false;
|
||||||
|
private $host_verified = false;
|
||||||
|
|
||||||
|
private $config_dura = 0;
|
||||||
|
private $config_path = '';
|
||||||
|
private $config_domain = '';
|
||||||
|
private $config_secure = false;
|
||||||
|
private $config_httponly = false;
|
||||||
|
|
||||||
|
private $server_http_host = null;
|
||||||
|
|
||||||
|
private $current_session_id = '';
|
||||||
|
private $current_session_ip = '';
|
||||||
|
|
||||||
|
public $memcache_handle = null;
|
||||||
|
|
||||||
|
public function set_cookie_params($duration, $path, $domain, $secure, $httponly) {
|
||||||
|
session_set_cookie_params((time()+$duration), $path, $domain, $secure, $httponly);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verify_server() {
|
||||||
|
if ($this->bind_address !== $this->server_http_host) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verify_client($ip) {
|
||||||
|
if ($this->started && $this->memcache_handle !== null && $this->verify_server()) {
|
||||||
|
$read_client = $this->memcache_handle->get(md5((string)$ip));
|
||||||
|
if ($read_client !== false) {
|
||||||
|
if (md5((string)$ip) !== $read_client[0]) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_client($ip) {
|
||||||
|
if ($this->started && $this->memcache_handle !== null && $this->verify_client($ip)) {
|
||||||
|
$this->memcache_handle->set(md5((string)$ip), array($this->current_session_id, time()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_cookie() {
|
||||||
|
if ($this->started && $this->memcache_handle !== null && $this->verify_server() && $this->verify_client($ip)) {
|
||||||
|
@setcookie(session_name(), session_id(), $this->config_dura, $this->config_path, $this->config_domain, $this->config_secure, $this->config_httponly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy_session($ip) {
|
||||||
|
if ($this->started && $this->verify_server() && $this->verify_client($ip)) {
|
||||||
|
$this->memcache_handle->delete(md5((string)$ip));
|
||||||
|
if (ini_get('session.use_cookies')) {
|
||||||
|
setcookie(session_name(), '', time() - 42000, $config_path, $config_domain, $config_secure, $config_httponly);
|
||||||
|
}
|
||||||
|
session_destroy();
|
||||||
|
session_regenerate_id(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function create_session($ip) {
|
public function create_session($ip) {
|
||||||
// TODO: put memcache rate limiting into here
|
if (!$this->verify_server()) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$session_start = @session_start();
|
||||||
|
if (!$session_start) {
|
||||||
|
session_destroy();
|
||||||
|
session_regenerate_id(true);
|
||||||
|
session_start();
|
||||||
|
$this->update_client($ip);
|
||||||
|
$this->started = true;
|
||||||
|
$this->current_session_id = session_id();
|
||||||
|
$this->set_cookie();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
if ($this->verify_server() && $this->verify_client($ip)) {
|
||||||
|
$this->update_client($ip);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct($config, $server_host) {
|
||||||
|
$this->config_dura = $config['cookie']['duration'];
|
||||||
|
$this->config_path = $config['cookie']['path'];
|
||||||
|
$this->config_domain = $config['cookie']['domain'];
|
||||||
|
$this->config_secure = $config['cookie']['secure'];
|
||||||
|
$this->config_httponly = $config['cookie']['httponly'];
|
||||||
|
if ($config['strict__enforce_ssl']) $config['strict__bind_protocol'] = 'https';
|
||||||
|
$this->bind_address = $config['strict__bind_protocol']."://".$config['strict__bind_host'].":".$config['strict__bind_port'];
|
||||||
|
$this->server_http_host = $config['strict__bind_protocol']."://".$_SERVER['HTTP_HOST'].":".$config['strict__bind_port'];
|
||||||
|
unset($config);
|
||||||
|
$this->set_cookie_params((time()+$this->config_dura), $this->config_path, $this->config_domain, $this->config_secure, $this->config_httponly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,11 +129,11 @@ class mysqli_strict extends mysqli {
|
|||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
$return_dbl = filter_var($acopy[$i], FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);
|
$return_dbl = filter_var($acopy[$i], FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);
|
||||||
return ($return_dbl !== null) ? (double)$return_dbl : false;
|
return ($return_dbl !== null) ? (float)$return_dbl : false;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
$return_bool = filter_var($acopy[$i], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
|
$return_bool = filter_var($acopy[$i], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
|
||||||
return ($return_bool !== null) ? (boolean)$return_bool : false;
|
return ($return_bool !== null) ? (bool)$return_bool : false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Template extends Base {
|
class Template extends Base {
|
||||||
protected $table = 'templates';
|
protected $table = 'templates';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Token Extends Base {
|
class Token Extends Base {
|
||||||
protected $table = 'tokens';
|
protected $table = 'tokens';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Token_Type Extends Base {
|
class Token_Type Extends Base {
|
||||||
protected $table = 'token_types';
|
protected $table = 'token_types';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for our cronjobs
|
* Helper class for our cronjobs
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class Transaction extends Base {
|
class Transaction extends Base {
|
||||||
protected $table = 'transactions';
|
protected $table = 'transactions';
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
class User extends Base {
|
class User extends Base {
|
||||||
protected $table = 'accounts';
|
protected $table = 'accounts';
|
||||||
@ -531,7 +528,7 @@ class User extends Base {
|
|||||||
// Enforce generation of a new Session ID and delete the old
|
// Enforce generation of a new Session ID and delete the old
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
// Enforce a page reload and point towards login with referrer included, if supplied
|
// Enforce a page reload and point towards login with referrer included, if supplied
|
||||||
$port = ($_SERVER["SERVER_PORT"] == "80" or $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]);
|
$port = ($_SERVER["SERVER_PORT"] == "80" || $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]);
|
||||||
$location = @$_SERVER['HTTPS'] ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'] : 'http://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'];
|
$location = @$_SERVER['HTTPS'] ? 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'] : 'http://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'];
|
||||||
if (!empty($from)) $location .= '?page=login&to=' . urlencode($from);
|
if (!empty($from)) $location .= '?page=login&to=' . urlencode($from);
|
||||||
// if (!headers_sent()) header('Location: ' . $location);
|
// if (!headers_sent()) header('Location: ' . $location);
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
class Worker extends Base {
|
class Worker extends Base {
|
||||||
protected $table = 'pool_worker';
|
protected $table = 'pool_worker';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
$aThemes = $template->getThemes();
|
$aThemes = $template->getThemes();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
$aErrorCodes['OK'] = 'OK';
|
$aErrorCodes['OK'] = 'OK';
|
||||||
$aErrorCodes['E0001'] = 'Out of Order Share Detected';
|
$aErrorCodes['E0001'] = 'Out of Order Share Detected';
|
||||||
|
|||||||
@ -1,13 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
/**
|
||||||
|
* Forces extra security options when enabled
|
||||||
|
*/
|
||||||
|
$config['strict'] = true;
|
||||||
|
$config['strict__enforce_ssl'] = false;
|
||||||
|
$config['strict__bind_protocol'] = 'http';
|
||||||
|
$config['strict__bind_host'] = 'localhost';
|
||||||
|
$config['strict__bind_port'] = 80;
|
||||||
|
// CHANGE THIS KEY
|
||||||
|
define('strict__FIP_key', '45934debe4965c10c424254a2c8170df');
|
||||||
|
// If you use this, you'll also have to change a key in public/index.php ... you'll see.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not edit this unless you have confirmed that your config has been updated!
|
* Do not edit this unless you have confirmed that your config has been updated!
|
||||||
* This is used in the version check to ensure you run the latest version of the configuration file.
|
* This is used in the version check to ensure you run the latest version of the configuration file.
|
||||||
* Once you upgraded your config, change the version here too.
|
* Once you upgraded your config, change the version here too.
|
||||||
**/
|
**/
|
||||||
$config['version'] = '0.0.6';
|
$config['version'] = '0.0.7';
|
||||||
|
|
||||||
// Our include directory for additional features
|
// Our include directory for additional features
|
||||||
define('INCLUDE_DIR', BASEPATH . 'include');
|
define('INCLUDE_DIR', BASEPATH . 'include');
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
define('STATISTICS_ALL_USER_SHARES', 'STATISTICS_ALL_USER_SHARES');
|
define('STATISTICS_ALL_USER_SHARES', 'STATISTICS_ALL_USER_SHARES');
|
||||||
define('STATISTICS_ALL_USER_HASHRATES', 'STATISTICS_ALL_USER_HASHRATES');
|
define('STATISTICS_ALL_USER_HASHRATES', 'STATISTICS_ALL_USER_HASHRATES');
|
||||||
|
|||||||
@ -1,15 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Instantiate class, we are using mysqlng
|
// Instantiate class, we are using mysqlng
|
||||||
if ($config['strict']) {
|
if ($config['strict']) {
|
||||||
$mysqli = new mysqli_strict($config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name'], $config['db']['port']) or die('couldnt load class');
|
$mysqli = new mysqli_strict($config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name'], $config['db']['port']);
|
||||||
//$mysqli = new mysqli($config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name'], $config['db']['port']);
|
|
||||||
} else {
|
} else {
|
||||||
|
$mysqli = new mysqli($config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name'], $config['db']['port']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if read-only and quit if it is on
|
// Check if read-only and quit if it is on
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($setting->getValue('disable_donors')) {
|
if ($setting->getValue('disable_donors')) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($setting->getValue('disable_about')) {
|
if ($setting->getValue('disable_about')) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Confirm an account by token
|
// Confirm an account by token
|
||||||
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL);
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// twofactor stuff
|
// twofactor stuff
|
||||||
$cp_editable = $wf_editable = $ea_editable = $wf_sent = $ea_sent = $cp_sent = 0;
|
$cp_editable = $wf_editable = $ea_editable = $wf_sent = $ea_sent = $cp_sent = 0;
|
||||||
@ -178,14 +175,15 @@ if ($user->isAuthenticated() && $config['twofactor']['enabled']) {
|
|||||||
(!empty($wfprep_sent) && empty($wfprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $message_tokensent_invalid.$messages_tokensent_status['wf'], 'TYPE' => 'success'):"";
|
(!empty($wfprep_sent) && empty($wfprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $message_tokensent_invalid.$messages_tokensent_status['wf'], 'TYPE' => 'success'):"";
|
||||||
(!empty($cpprep_sent) && !empty($cpprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $cpprep_sent, 'TYPE' => 'success'):"";
|
(!empty($cpprep_sent) && !empty($cpprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $cpprep_sent, 'TYPE' => 'success'):"";
|
||||||
(!empty($cpprep_sent) && empty($cpprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $message_tokensent_invalid.$messages_tokensent_status['cp'], 'TYPE' => 'success'):"";
|
(!empty($cpprep_sent) && empty($cpprep_edit)) ? $_SESSION['POPUP'][] = array('CONTENT' => $message_tokensent_invalid.$messages_tokensent_status['cp'], 'TYPE' => 'success'):"";
|
||||||
|
// two-factor stuff
|
||||||
|
$smarty->assign("CHANGEPASSUNLOCKED", $cp_editable);
|
||||||
|
$smarty->assign("WITHDRAWUNLOCKED", $wf_editable);
|
||||||
|
$smarty->assign("DETAILSUNLOCKED", $ea_editable);
|
||||||
|
$smarty->assign("CHANGEPASSSENT", $cp_sent);
|
||||||
|
$smarty->assign("WITHDRAWSENT", $wf_sent);
|
||||||
|
$smarty->assign("DETAILSSENT", $ea_sent);
|
||||||
}
|
}
|
||||||
// two-factor stuff
|
|
||||||
$smarty->assign("CHANGEPASSUNLOCKED", $cp_editable);
|
|
||||||
$smarty->assign("WITHDRAWUNLOCKED", $wf_editable);
|
|
||||||
$smarty->assign("DETAILSUNLOCKED", $ea_editable);
|
|
||||||
$smarty->assign("CHANGEPASSSENT", $cp_sent);
|
|
||||||
$smarty->assign("WITHDRAWSENT", $wf_sent);
|
|
||||||
$smarty->assign("DETAILSSENT", $ea_sent);
|
|
||||||
$smarty->assign("DONATE_THRESHOLD", $config['donate_threshold']);
|
$smarty->assign("DONATE_THRESHOLD", $config['donate_threshold']);
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
if (!$setting->getValue('disable_invitations')) {
|
if (!$setting->getValue('disable_invitations')) {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
if ($setting->getValue('disable_notifications') == 1) {
|
if ($setting->getValue('disable_notifications') == 1) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Notification system disabled by admin.', 'TYPE' => 'info');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Notification system disabled by admin.', 'TYPE' => 'info');
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) $smarty->assign("CONTENT", "default.tpl");
|
if ($user->isAuthenticated()) $smarty->assign("CONTENT", "default.tpl");
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
// Reset failed login counter
|
// Reset failed login counter
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
$iLimit = 30;
|
$iLimit = 30;
|
||||||
empty($_REQUEST['start']) ? $start = 0 : $start = $_REQUEST['start'];
|
empty($_REQUEST['start']) ? $start = 0 : $start = $_REQUEST['start'];
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Confirm an account by token
|
// Confirm an account by token
|
||||||
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
switch (@$_REQUEST['do']) {
|
switch (@$_REQUEST['do']) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// Make sure we are called from index.php
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user to ensure they are admin
|
// Check user to ensure they are admin
|
||||||
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the system is enabled
|
// Check if the system is enabled
|
||||||
if ($setting->getValue('disable_dashboard_api')) {
|
if ($setting->getValue('disable_dashboard_api')) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the system is enabled
|
// Check if the system is enabled
|
||||||
if ($setting->getValue('disable_navbar_api')) {
|
if ($setting->getValue('disable_navbar_api')) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check user token and access level permissions
|
// Check user token and access level permissions
|
||||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Check if the API is activated
|
// Check if the API is activated
|
||||||
$api->isActive();
|
$api->isActive();
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($setting->getValue('disable_contactform')) {
|
if ($setting->getValue('disable_contactform')) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($setting->getValue('recaptcha_enabled')) {
|
if ($setting->getValue('recaptcha_enabled')) {
|
||||||
// Load re-captcha specific data
|
// Load re-captcha specific data
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
if (! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
if (! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
6
public/include/pages/error/ratelimit.inc.php
Normal file
6
public/include/pages/error/ratelimit.inc.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
|
// Tempalte specifics
|
||||||
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
?>
|
||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
$smarty->assign("SITESTRATUMURL", $config['gettingstarted']['stratumurl']);
|
$smarty->assign("SITESTRATUMURL", $config['gettingstarted']['stratumurl']);
|
||||||
$smarty->assign("SITESTRATUMPORT", $config['gettingstarted']['stratumport']);
|
$smarty->assign("SITESTRATUMPORT", $config['gettingstarted']['stratumport']);
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Include markdown library
|
// Include markdown library
|
||||||
use \Michelf\Markdown;
|
use \Michelf\Markdown;
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// ReCaptcha handling if enabled
|
// ReCaptcha handling if enabled
|
||||||
if ($setting->getValue('recaptcha_enabled') && $setting->getValue('recaptcha_enabled_logins')) {
|
if ($setting->getValue('recaptcha_enabled') && $setting->getValue('recaptcha_enabled_logins')) {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
// Make sure we are called from index.php
|
if ($config['strict']) {
|
||||||
if (!defined('SECURITY'))
|
$session->destroy_session($_SERVER['REMOTE_ADDR']);
|
||||||
die('Hacking attempt');
|
$user->logoutUser();
|
||||||
|
} else {
|
||||||
// This probably (?) never fails
|
$user->logoutUser();
|
||||||
$user->logoutUser();
|
}
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Include markdown library
|
// Include markdown library
|
||||||
use \Michelf\Markdown;
|
use \Michelf\Markdown;
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY'))
|
|
||||||
die('Hacking attempt');
|
|
||||||
|
|
||||||
if (!$config['csrf']['enabled'] || $config['csrf']['enabled'] && $csrftoken->valid) {
|
if (!$config['csrf']['enabled'] || $config['csrf']['enabled'] && $csrftoken->valid) {
|
||||||
if (isset($_POST['do']) && $_POST['do'] == 'resetPassword') {
|
if (isset($_POST['do']) && $_POST['do'] == 'resetPassword') {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Process password reset request
|
// Process password reset request
|
||||||
if (!$config['csrf']['enabled'] || $config['csrf']['enabled'] && $csrftoken->valid) {
|
if (!$config['csrf']['enabled'] || $config['csrf']['enabled'] && $csrftoken->valid) {
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
if ($setting->getValue('lock_registration') && $setting->getValue('disable_invitations')) {
|
if ($setting->getValue('lock_registration') && $setting->getValue('disable_invitations')) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Account registration is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Account registration is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user