Сборка 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:
2026-07-30 02:00:01 +00:00
commit 6ee2744e3a
492 changed files with 354172 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
<?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 locationsModel extends Model {
public function createLocation($data) {
$sql = "INSERT INTO `locations` SET ";
$sql .= "location_name = '" . $this->db->escape($data['location_name']) . "', ";
$sql .= "location_ip = '" . $this->db->escape($data['location_ip']) . "', ";
$sql .= "location_ip2 = '" . $this->db->escape($data['location_ip2']) . "', ";
$sql .= "location_user = '" . $this->db->escape($data['location_user']) . "', ";
$sql .= "location_password = '" . $this->db->escape($data['location_password']) . "', ";
$sql .= "location_status = '" . (int)$data['location_status'] . "'";
$this->db->query($sql);
return $this->db->getLastId();
}
public function deleteLocation($locationid) {
$sql = "DELETE FROM `locations` WHERE location_id = '" . (int)$locationid . "'";
$this->db->query($sql);
}
public function updateLocation($locationid, $data = array()) {
$sql = "UPDATE `locations`";
if(!empty($data)) {
$count = count($data);
$sql .= " SET";
foreach($data as $key => $value) {
$sql .= " $key = '" . $this->db->escape($value) . "'";
$count--;
if($count > 0) $sql .= ",";
}
}
$sql .= " WHERE `location_id` = '" . (int)$locationid . "'";
$query = $this->db->query($sql);
return true;
}
public function getLocations($data = array(), $sort = array(), $options = array()) {
$sql = "SELECT * FROM `locations`";
if(!empty($data)) {
$count = count($data);
$sql .= " WHERE";
foreach($data as $key => $value) {
$sql .= " $key = '" . $this->db->escape($value) . "'";
$count--;
if($count > 0) $sql .= " AND";
}
}
if(!empty($sort)) {
$count = count($sort);
$sql .= " ORDER BY";
foreach($sort as $key => $value) {
$sql .= " $key " . $value;
$count--;
if($count > 0) $sql .= ",";
}
}
if(!empty($options)) {
if ($options['start'] < 0) {
$options['start'] = 0;
}
if ($options['limit'] < 1) {
$options['limit'] = 20;
}
$sql .= " LIMIT " . (int)$options['start'] . "," . (int)$options['limit'];
}
$query = $this->db->query($sql);
return $query->rows;
}
public function getLocationById($locationid) {
$sql = "SELECT * FROM `locations` WHERE `location_id` = '" . (int)$locationid . "' LIMIT 1";
$query = $this->db->query($sql);
return $query->row;
}
public function getTotalLocations($data = array()) {
$sql = "SELECT COUNT(*) AS count FROM `locations`";
if(!empty($data)) {
$count = count($data);
$sql .= " WHERE";
foreach($data as $key => $value) {
$sql .= " $key = '" . $this->db->escape($value) . "'";
$count--;
if($count > 0) $sql .= " AND";
}
}
$query = $this->db->query($sql);
return $query->row['count'];
}
}
?>