Сборка 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,53 @@
|
||||
<?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 indexController extends Controller {
|
||||
private $limit = 20;
|
||||
public function index($page = 1) {
|
||||
$this->document->setActiveSection('admin/infobox');
|
||||
$this->document->setActiveItem('index');
|
||||
|
||||
if(!$this->user->isLogged()) {
|
||||
$this->session->data['error'] = "Вы не авторизированы!";
|
||||
$this->response->redirect($this->config->url . 'account/login');
|
||||
}
|
||||
if($this->user->getAccessLevel() < 2) {
|
||||
$this->session->data['error'] = "У вас нет доступа к данному разделу!";
|
||||
$this->response->redirect($this->config->url);
|
||||
}
|
||||
|
||||
$this->load->library('pagination');
|
||||
$this->load->model('mail');
|
||||
|
||||
$getData = array();
|
||||
|
||||
$getSort = array(
|
||||
'status' => 'DESC',
|
||||
'inbox_date_add' => 'DESC'
|
||||
);
|
||||
|
||||
$getOptions = array(
|
||||
'start' => ($page - 1) * $this->limit,
|
||||
'limit' => $this->limit
|
||||
);
|
||||
|
||||
$total = $this->mailModel->getTotalInbox($getData);
|
||||
$this->data['mail'] = $this->mailModel->getInboxs($getData, $getSort, $getOptions);
|
||||
|
||||
$paginationUrl = '/admin/infobox/index/index/{page}';
|
||||
$paginationLib = new paginationLibrary();
|
||||
$paginationLib->total = $total;
|
||||
$paginationLib->page = $page;
|
||||
$paginationLib->limit = $this->limit;
|
||||
$paginationLib->url = $paginationUrl;
|
||||
$pagination = $paginationLib->render();
|
||||
|
||||
$this->data['pagination'] = $pagination;
|
||||
|
||||
$this->getChild(array('common/admheader', 'common/footer'));
|
||||
return $this->load->view('admin/infobox/index', $this->data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?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 sendController extends Controller {
|
||||
public function index($id = null) {
|
||||
$this->document->setActiveSection('admin/infobox');
|
||||
$this->document->setActiveItem('send');
|
||||
$this->data['url'] = $this->config->url;
|
||||
|
||||
if(!$this->user->isLogged()) {
|
||||
$this->session->data['error'] = "Вы не авторизированы!";
|
||||
$this->response->redirect($this->config->url . 'account/login');
|
||||
}
|
||||
if($this->user->getAccessLevel() < 3) {
|
||||
$this->session->data['error'] = "У вас нет доступа к данному разделу!";
|
||||
$this->response->redirect($this->config->url);
|
||||
}
|
||||
|
||||
$this->load->model('mail');
|
||||
$this->data['mail'] = $this->mailModel->getInboxById($id);
|
||||
|
||||
$this->getChild(array('common/admheader', 'common/footer'));
|
||||
return $this->load->view('admin/infobox/send', $this->data);
|
||||
}
|
||||
|
||||
public function sendMForm($id = null) {
|
||||
if(!$this->user->isLogged()) {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "Вы не авторизированы!";
|
||||
return json_encode($this->data);
|
||||
}
|
||||
if($this->user->getAccessLevel() < 3) {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "У вас нет доступа к данному разделу!";
|
||||
return json_encode($this->data);
|
||||
}
|
||||
|
||||
$this->load->model('mail');
|
||||
$this->load->library('mail');
|
||||
|
||||
if($this->request->server['REQUEST_METHOD'] == 'POST') {
|
||||
if(@$this->request->post['msg'] == ""){
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "Введите текст ответа!";
|
||||
}elseif(@$this->request->post['msg'] != ""){
|
||||
$text = @$this->request->post['msg'];
|
||||
$dell = @$this->request->post['dell'];
|
||||
$data = $this->mailModel->getInboxById($id);
|
||||
|
||||
$email = $data['user_email'];
|
||||
$firstname = $data['user_firstname'];
|
||||
$lastname = $data['user_lastname'];
|
||||
|
||||
$mailLib = new mailLibrary();
|
||||
$mailLib->setFrom($this->config->mail_from);
|
||||
$mailLib->setSender($this->config->mail_sender);
|
||||
$mailLib->setTo($email);
|
||||
$mailLib->setSubject('Ответ на ваше сообщение');
|
||||
|
||||
$mailData = array();
|
||||
$mailData['firstname'] = $firstname;
|
||||
$mailData['lastname'] = $lastname;
|
||||
$mailData['text'] = $text;
|
||||
|
||||
$texts = $this->load->view('mail/infobox/user', $mailData);
|
||||
|
||||
$mailLib->setText($texts);
|
||||
$mailLib->send();
|
||||
|
||||
|
||||
if($dell) {
|
||||
$this->mailModel->deleteInbox($id);
|
||||
$this->data['status'] = "success";
|
||||
$this->data['success'] = "Сообщение отправлено, и удалено!";
|
||||
} else {
|
||||
$this->mailModel->updateInbox($id, array('status' => 0));
|
||||
$this->data['status'] = "success";
|
||||
$this->data['success'] = "Сообщение отправлено!";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->data['status'] = "error";
|
||||
$this->data['error'] = "Не POST данные";
|
||||
}
|
||||
return json_encode($this->data);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user