Сборка 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,76 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
|
||||
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
|
||||
*/
|
||||
class footerController extends Controller {
|
||||
public function index() {
|
||||
$this->data['title'] = $this->config->title;
|
||||
$this->data['description'] = $this->config->description;
|
||||
$this->data['public'] = $this->config->public;
|
||||
|
||||
return $this->load->view('common/footer', $this->data);
|
||||
}
|
||||
|
||||
public function getstatus($action) {
|
||||
if(!$this->user->isLogged()) {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "Вы не авторизированы!";
|
||||
return json_encode($this->data);
|
||||
}
|
||||
if($this->user->getAccessLevel() < 1) {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "У вас нет доступа к данному разделу!";
|
||||
return json_encode($this->data);
|
||||
}
|
||||
|
||||
$userid = $this->user->getId();
|
||||
|
||||
$this->load->model('users');
|
||||
|
||||
switch($action) {
|
||||
case 'online': {
|
||||
$LastTime = time() - 105;
|
||||
|
||||
$online = 0;
|
||||
foreach($this->usersModel->getUsers() as $line) {
|
||||
if ($line['user_online_date'] > $LastTime) {
|
||||
$online++;
|
||||
}
|
||||
}
|
||||
|
||||
$this->usersModel->updateUser($userid, array('user_online_date'=> time()));
|
||||
$this->data['status'] = "online";
|
||||
$this->data['online'] = "USERID ".$userid." ".$this->user->getFirstname()." UPD-DATE ".date("Y-m-d H:i:s")." | ".$LastTime." LVL ".$this->user->getAccessLevel()." ST.OK";
|
||||
$this->data['online_usr'] = $online;
|
||||
break;
|
||||
}
|
||||
case 'online_sup': {
|
||||
$LastTime = time() - 105;
|
||||
|
||||
$online_sup = 0;
|
||||
foreach($this->usersModel->getUsers() as $line) {
|
||||
if($line['user_access_level'] > 1) {
|
||||
if ($line['user_online_date'] > $LastTime) {
|
||||
$online_sup++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($online_sup > 0) {
|
||||
$this->data['sup_status'] = "Online";
|
||||
} else {
|
||||
$this->data['sup_status'] = "Offline";
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "Вы выбрали несуществующее действие!";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return json_encode($this->data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user