Сборка REDL: панель на PHP 8, капча-тумблер, закрытые уязвимости, установщики в один клик
- панель работает на PHP 8.4 (оригинал под PHP 7.0): elFinder utf8_encode, apache_get_modules, warnings - капча выключена и управляется из админки (флаг captcha_enable + блок настроек) - закрыты две SQL-инъекции без авторизации (createAuthLog: пароль из POST и CF-Connecting-IP) - убрано хранение паролей в открытом виде в authlog, XSS в поле ref - установщики install-panel.sh и install-node.sh (оригинальный затирал sources.list репозиториями Debian 9) - современный Dockerfile (оригинальный на debian:stretch больше не собирается) - планировщик и автозапуск работают без systemd - брендинг REDL.IO, год 2026, ссылки на redl.io - документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
mb_internal_encoding("UTF-8");
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
date_default_timezone_set("Europe/Moscow");
|
||||
|
||||
define('TMP_DIR', dirname(__FILE__) . '/tmp/');
|
||||
define('ENGINE_DIR', dirname(__FILE__) . '/engine/');
|
||||
define('APPLICATION_DIR', dirname(__FILE__) . '/application/');
|
||||
|
||||
require_once(ENGINE_DIR . 'main/controller.php');
|
||||
require_once(ENGINE_DIR . 'main/model.php');
|
||||
|
||||
require_once(ENGINE_DIR . 'main/registry.php');
|
||||
require_once(ENGINE_DIR . 'main/config.php');
|
||||
require_once(ENGINE_DIR . 'main/game_settings.php');
|
||||
require_once(ENGINE_DIR . 'main/request.php');
|
||||
require_once(ENGINE_DIR . 'main/session.php');
|
||||
require_once(ENGINE_DIR . 'main/response.php');
|
||||
require_once(ENGINE_DIR . 'main/document.php');
|
||||
require_once(ENGINE_DIR . 'main/db.php');
|
||||
require_once(ENGINE_DIR . 'main/user.php');
|
||||
require_once(ENGINE_DIR . 'main/load.php');
|
||||
require_once(ENGINE_DIR . 'main/action.php');
|
||||
require_once(ENGINE_DIR . 'main/cookie.php');
|
||||
|
||||
$registry = new Registry();
|
||||
|
||||
$config = new Config();
|
||||
$registry->config = $config;
|
||||
|
||||
$game_settings = new Game_settings();
|
||||
$registry->game_settings = $game_settings;
|
||||
|
||||
$request = new Request();
|
||||
$registry->request = $request;
|
||||
|
||||
$session = new Session();
|
||||
$registry->session = $session;
|
||||
|
||||
$response = new Response();
|
||||
$registry->response = $response;
|
||||
|
||||
$document = new Document();
|
||||
$registry->document = $document;
|
||||
|
||||
$cookie = new Cookie();
|
||||
$registry->cookie = $cookie;
|
||||
|
||||
$db = new DB($config->db_type, $config->db_hostname, $config->db_username, $config->db_password, $config->db_database);
|
||||
$registry->db = $db;
|
||||
|
||||
$user = new User($registry);
|
||||
$registry->user = $user;
|
||||
|
||||
$load = new Load($registry);
|
||||
$registry->load = $load;
|
||||
|
||||
$action = new Action($registry);
|
||||
$registry->action = $action;
|
||||
$actionString = parse_url($request->server["REQUEST_URI"], PHP_URL_PATH);
|
||||
if ($actionString == '/') {
|
||||
$actionString = '';
|
||||
}
|
||||
|
||||
if(!empty($actionString)) {
|
||||
$action->make($actionString);
|
||||
} else {
|
||||
$action->make('main/index');
|
||||
}
|
||||
|
||||
$response->output($action->go());
|
||||
?>
|
||||
Reference in New Issue
Block a user