Upgraded to 1.1.0

1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
This commit is contained in:
Hosteroid
2025-10-09 18:02:46 +03:00
parent adc28b97f0
commit e5b9599755
61 changed files with 6838 additions and 812 deletions

View File

@@ -19,6 +19,18 @@ class TldRegistryController extends Controller
$this->importLogModel = new TldImportLog();
$this->tldService = new TldRegistryService();
}
/**
* Check if current user is admin
*/
private function requireAdmin()
{
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') {
$_SESSION['error'] = 'Access denied. Admin privileges required.';
$this->redirect('/tld-registry');
exit;
}
}
/**
* Display TLD registry dashboard
@@ -76,6 +88,8 @@ class TldRegistryController extends Controller
*/
public function importTldList()
{
$this->requireAdmin();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$this->redirect('/tld-registry');
return;
@@ -109,6 +123,8 @@ class TldRegistryController extends Controller
*/
public function importRdap()
{
$this->requireAdmin();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$this->redirect('/tld-registry');
return;
@@ -142,6 +158,8 @@ class TldRegistryController extends Controller
*/
public function importWhois()
{
$this->requireAdmin();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$this->redirect('/tld-registry');
return;
@@ -179,6 +197,8 @@ class TldRegistryController extends Controller
*/
public function checkUpdates()
{
$this->requireAdmin();
try {
$updateInfo = $this->tldService->checkForUpdates();
@@ -219,6 +239,8 @@ class TldRegistryController extends Controller
*/
public function startProgressiveImport()
{
$this->requireAdmin();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$this->redirect('/tld-registry');
return;
@@ -312,6 +334,8 @@ class TldRegistryController extends Controller
*/
public function bulkDelete()
{
$this->requireAdmin();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
$this->redirect('/tld-registry');
return;
@@ -347,6 +371,8 @@ class TldRegistryController extends Controller
*/
public function toggleActive($params = [])
{
$this->requireAdmin();
$id = $params['id'] ?? 0;
$tld = $this->tldModel->find($id);
@@ -369,6 +395,8 @@ class TldRegistryController extends Controller
*/
public function refresh($params = [])
{
$this->requireAdmin();
$id = $params['id'] ?? 0;
$tld = $this->tldModel->find($id);