2025-10-08 14:23:07 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Core\Application;
|
|
|
|
|
use Core\Auth;
|
|
|
|
|
use App\Controllers\DashboardController;
|
|
|
|
|
use App\Controllers\DomainController;
|
|
|
|
|
use App\Controllers\NotificationGroupController;
|
|
|
|
|
use App\Controllers\AuthController;
|
|
|
|
|
use App\Controllers\DebugController;
|
|
|
|
|
use App\Controllers\SearchController;
|
|
|
|
|
use App\Controllers\TldRegistryController;
|
2025-10-08 18:54:34 +03:00
|
|
|
use App\Controllers\SettingsController;
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
use App\Controllers\ProfileController;
|
|
|
|
|
use App\Controllers\UserController;
|
|
|
|
|
use App\Controllers\InstallerController;
|
|
|
|
|
use App\Controllers\NotificationController;
|
2025-10-10 14:01:19 +03:00
|
|
|
use App\Controllers\ErrorLogController;
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
use App\Controllers\TwoFactorController;
|
2025-10-25 02:04:00 +03:00
|
|
|
use App\Controllers\TagController;
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
use App\Controllers\UpdateController;
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
$router = Application::$router;
|
|
|
|
|
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
// Installer routes (public - before auth)
|
|
|
|
|
$router->get('/install', [InstallerController::class, 'index']);
|
|
|
|
|
$router->get('/install/check-database', [InstallerController::class, 'checkDatabase']);
|
|
|
|
|
$router->post('/install/run', [InstallerController::class, 'install']);
|
|
|
|
|
$router->get('/install/complete', [InstallerController::class, 'complete']);
|
|
|
|
|
$router->get('/install/update', [InstallerController::class, 'showUpdate']);
|
|
|
|
|
$router->post('/install/update', [InstallerController::class, 'runUpdate']);
|
|
|
|
|
|
2025-10-08 14:23:07 +03:00
|
|
|
// Authentication routes (public)
|
|
|
|
|
$router->get('/login', [AuthController::class, 'showLogin']);
|
|
|
|
|
$router->post('/login', [AuthController::class, 'login']);
|
|
|
|
|
$router->get('/logout', [AuthController::class, 'logout']);
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
$router->get('/register', [AuthController::class, 'showRegister']);
|
|
|
|
|
$router->post('/register', [AuthController::class, 'register']);
|
|
|
|
|
$router->get('/verify-email', [AuthController::class, 'showVerifyEmail']);
|
|
|
|
|
$router->get('/resend-verification', [AuthController::class, 'resendVerification']);
|
|
|
|
|
$router->get('/forgot-password', [AuthController::class, 'showForgotPassword']);
|
|
|
|
|
$router->post('/forgot-password', [AuthController::class, 'forgotPassword']);
|
|
|
|
|
$router->get('/reset-password', [AuthController::class, 'showResetPassword']);
|
|
|
|
|
$router->post('/reset-password', [AuthController::class, 'resetPassword']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
// Two-Factor Authentication routes (public during verification)
|
|
|
|
|
$router->get('/2fa/verify', [TwoFactorController::class, 'showVerify']);
|
|
|
|
|
$router->post('/2fa/verify', [TwoFactorController::class, 'verify']);
|
|
|
|
|
$router->post('/2fa/send-email-code', [TwoFactorController::class, 'sendEmailCode']);
|
|
|
|
|
|
2025-10-08 14:23:07 +03:00
|
|
|
// Protected routes - require authentication
|
|
|
|
|
Auth::require();
|
|
|
|
|
|
Improve security, validation, and isolation checks
Add multiple security and validation improvements across the app:
- Prevent session fixation: regenerate session ID on login and after successful 2FA; tighten session cookie params (Secure, HttpOnly, SameSite=Lax).
- Harden installer: add CSRF checks for install/update flows and use PDO::quote when injecting admin credentials into SQL migration to avoid injection; add csrf_field() to installer templates.
- Template hardening: add safe_url and safe_mailto Twig filters, escape tag names for JS, and add rel="noopener noreferrer" to external links to mitigate XSS/opener risks.
- Domain controller: validate referrer to avoid open redirects, enforce user isolation mode when finding/deleting/updating domains and when assigning notification groups (ensures users only affect their own resources).
- Notification groups: verify channel belongs to group before deleting or toggling to prevent unauthorized access.
- ErrorLog: whitelist allowed sort columns to avoid arbitrary column injection in ORDER BY.
- Routes: move the debug whois route to protected/admin area.
These changes collectively reduce attack surface (XSS, open redirect, session fixation, SQL injection) and enforce proper resource isolation and input validation.
2026-03-11 00:03:54 +02:00
|
|
|
// Debug route (admin-only)
|
|
|
|
|
$router->get('/debug/whois', [DebugController::class, 'whois']);
|
|
|
|
|
|
2025-10-08 14:23:07 +03:00
|
|
|
// Dashboard
|
|
|
|
|
$router->get('/', [DashboardController::class, 'index']);
|
|
|
|
|
$router->get('/dashboard', [DashboardController::class, 'index']);
|
|
|
|
|
|
|
|
|
|
// Search
|
|
|
|
|
$router->get('/search', [SearchController::class, 'index']);
|
|
|
|
|
$router->get('/api/search/suggest', [SearchController::class, 'suggest']);
|
|
|
|
|
|
|
|
|
|
// Domains
|
|
|
|
|
$router->get('/domains', [DomainController::class, 'index']);
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
$router->get('/domains/export', [DomainController::class, 'export']);
|
|
|
|
|
$router->post('/domains/import', [DomainController::class, 'import']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->get('/domains/create', [DomainController::class, 'create']);
|
|
|
|
|
$router->get('/domains/bulk-add', [DomainController::class, 'bulkAdd']);
|
|
|
|
|
$router->post('/domains/bulk-add', [DomainController::class, 'bulkAdd']);
|
|
|
|
|
$router->post('/domains/bulk-refresh', [DomainController::class, 'bulkRefresh']);
|
|
|
|
|
$router->post('/domains/bulk-delete', [DomainController::class, 'bulkDelete']);
|
|
|
|
|
$router->post('/domains/bulk-assign-group', [DomainController::class, 'bulkAssignGroup']);
|
|
|
|
|
$router->post('/domains/bulk-toggle-status', [DomainController::class, 'bulkToggleStatus']);
|
2025-10-12 12:46:16 +03:00
|
|
|
$router->post('/domains/bulk-add-tags', [DomainController::class, 'bulkAddTags']);
|
|
|
|
|
$router->post('/domains/bulk-remove-tags', [DomainController::class, 'bulkRemoveTags']);
|
2025-10-25 02:04:00 +03:00
|
|
|
$router->post('/domains/bulk-remove-specific-tag', [DomainController::class, 'bulkRemoveSpecificTag']);
|
|
|
|
|
$router->post('/domains/bulk-assign-existing-tag', [DomainController::class, 'bulkAssignExistingTag']);
|
|
|
|
|
$router->post('/domains/get-tags-for-domains', [DomainController::class, 'getTagsForDomains']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/domains/transfer', [DomainController::class, 'transfer']);
|
|
|
|
|
$router->post('/domains/bulk-transfer', [DomainController::class, 'bulkTransfer']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->post('/domains/store', [DomainController::class, 'store']);
|
|
|
|
|
$router->get('/domains/{id}', [DomainController::class, 'show']);
|
|
|
|
|
$router->get('/domains/{id}/edit', [DomainController::class, 'edit']);
|
|
|
|
|
$router->post('/domains/{id}/update', [DomainController::class, 'update']);
|
2025-10-08 20:56:25 +03:00
|
|
|
$router->post('/domains/{id}/update-notes', [DomainController::class, 'updateNotes']);
|
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
|
|
|
$router->post('/domains/{id}/refresh-whois', [DomainController::class, 'refreshWhois']);
|
|
|
|
|
$router->post('/domains/{id}/refresh-dns', [DomainController::class, 'refreshDns']);
|
Enhance DNS discovery, validation & transfers
Add comprehensive DNS management and input validation, plus safer transfer and logging behavior.
- Add CronHelper utilities for cron scripts and unify logging/formatting.
- Improve InputValidator: sanitizeDomainInput and validateRootDomain (handles multi-level TLDs) and use throughout domain import/create flows to reject subdomains.
- DomainController: refactor DNS refresh to support quick/deep discovery (background deep scans), add endpoints to discover, add/delete/bulk-delete DNS records, import BIND zone files, enrich IP metadata via enrichIpDetails, and strengthen bulk import/reporting messages.
- DnsRecord model: add source column handling (discovered/manual/imported), avoid auto-deleting manual/imported records, and add helpers for deleting, bulk deleting, manual adding and importing zone records.
- Tag, NotificationGroup and Domain transfer logic: unlink groups when ownership changes, remove tags that belong to other users, add audit logging via Logger and improved bulk transfer reporting. TagController/View: show transferable users for admins and skip global tags on transfer.
- Notification channels (Discord, Mattermost, etc.) and EmailHelper: allow explicit subjects and improve payload fields based on notification type.
- Add new migration 029_add_dns_record_source.sql and wire it into the installer; update migrations detection.
- Add new views/partials for confirm/import/transfer modals, update various domain/group/tag templates, and update cron scripts and routes for discovery.
These changes preserve manual/imported DNS records, improve root-domain validation, enable background deep discovery, and add better logging/audit trails for transfers and imports.
2026-03-10 22:54:28 +02:00
|
|
|
$router->post('/domains/{id}/discover-dns', [DomainController::class, 'discoverDns']);
|
|
|
|
|
$router->post('/domains/{id}/dns-records', [DomainController::class, 'addDnsRecord']);
|
|
|
|
|
$router->post('/domains/{id}/dns-records/bulk-delete', [DomainController::class, 'bulkDeleteDnsRecords']);
|
|
|
|
|
$router->post('/domains/{id}/dns-records/{recordId}/delete', [DomainController::class, 'deleteDnsRecord']);
|
|
|
|
|
$router->post('/domains/{id}/dns-import', [DomainController::class, 'importDnsZone']);
|
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
|
|
|
$router->post('/domains/{id}/ssl/add', [DomainController::class, 'addSslHost']);
|
|
|
|
|
$router->post('/domains/{id}/ssl/refresh-all', [DomainController::class, 'refreshAllSsl']);
|
|
|
|
|
$router->post('/domains/{id}/ssl/bulk-refresh', [DomainController::class, 'bulkRefreshSsl']);
|
|
|
|
|
$router->post('/domains/{id}/ssl/bulk-delete', [DomainController::class, 'bulkDeleteSsl']);
|
|
|
|
|
$router->post('/domains/{id}/ssl/{certificateId}/refresh', [DomainController::class, 'refreshSsl']);
|
|
|
|
|
$router->post('/domains/{id}/ssl/{certificateId}/delete', [DomainController::class, 'deleteSsl']);
|
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
|
|
|
$router->post('/domains/{id}/refresh-all', [DomainController::class, 'refreshAll']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->post('/domains/{id}/delete', [DomainController::class, 'delete']);
|
|
|
|
|
|
|
|
|
|
// Notification Groups
|
|
|
|
|
$router->get('/groups', [NotificationGroupController::class, 'index']);
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
$router->get('/groups/export', [NotificationGroupController::class, 'export']);
|
|
|
|
|
$router->post('/groups/import', [NotificationGroupController::class, 'import']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->get('/groups/create', [NotificationGroupController::class, 'create']);
|
|
|
|
|
$router->post('/groups/store', [NotificationGroupController::class, 'store']);
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->get('/groups/{id}/edit', [NotificationGroupController::class, 'edit']);
|
|
|
|
|
$router->post('/groups/{id}/update', [NotificationGroupController::class, 'update']);
|
|
|
|
|
$router->post('/groups/{id}/delete', [NotificationGroupController::class, 'delete']);
|
2025-10-10 14:01:19 +03:00
|
|
|
$router->post('/groups/bulk-delete', [NotificationGroupController::class, 'bulkDelete']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/groups/transfer', [NotificationGroupController::class, 'transfer']);
|
|
|
|
|
$router->post('/groups/bulk-transfer', [NotificationGroupController::class, 'bulkTransfer']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
// Notification Channels
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->post('/groups/{group_id}/channels', [NotificationGroupController::class, 'addChannel']);
|
|
|
|
|
$router->post('/groups/{group_id}/channels/{id}/delete', [NotificationGroupController::class, 'deleteChannel']);
|
|
|
|
|
$router->post('/groups/{group_id}/channels/{id}/toggle', [NotificationGroupController::class, 'toggleChannel']);
|
2025-10-13 16:35:28 +03:00
|
|
|
$router->post('/channels/test', [NotificationGroupController::class, 'testChannel']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
// TLD Registry
|
|
|
|
|
$router->get('/tld-registry', [TldRegistryController::class, 'index']);
|
2026-03-02 11:17:58 +02:00
|
|
|
$router->get('/tld-registry/export', [TldRegistryController::class, 'export']);
|
|
|
|
|
$router->post('/tld-registry/import', [TldRegistryController::class, 'import']);
|
|
|
|
|
$router->post('/tld-registry/create', [TldRegistryController::class, 'createTld']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->get('/tld-registry/{id}', [TldRegistryController::class, 'show']);
|
|
|
|
|
$router->post('/tld-registry/import-tld-list', [TldRegistryController::class, 'importTldList']);
|
|
|
|
|
$router->post('/tld-registry/import-rdap', [TldRegistryController::class, 'importRdap']);
|
|
|
|
|
$router->post('/tld-registry/import-whois', [TldRegistryController::class, 'importWhois']);
|
|
|
|
|
$router->post('/tld-registry/start-progressive-import', [TldRegistryController::class, 'startProgressiveImport']);
|
|
|
|
|
$router->get('/tld-registry/import-progress/{log_id}', [TldRegistryController::class, 'importProgress']);
|
|
|
|
|
$router->get('/tld-registry/api/import-progress', [TldRegistryController::class, 'apiGetImportProgress']);
|
|
|
|
|
$router->post('/tld-registry/bulk-delete', [TldRegistryController::class, 'bulkDelete']);
|
|
|
|
|
$router->get('/tld-registry/check-updates', [TldRegistryController::class, 'checkUpdates']);
|
|
|
|
|
$router->get('/tld-registry/{id}/toggle-active', [TldRegistryController::class, 'toggleActive']);
|
|
|
|
|
$router->get('/tld-registry/{id}/refresh', [TldRegistryController::class, 'refresh']);
|
2025-11-21 14:49:41 +02:00
|
|
|
$router->post('/tld-registry/{id}/update-whois-server', [TldRegistryController::class, 'updateWhoisServer']);
|
2026-01-08 14:23:40 +02:00
|
|
|
$router->post('/tld-registry/{id}/update-rdap-servers', [TldRegistryController::class, 'updateRdapServers']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->get('/tld-registry/import-logs', [TldRegistryController::class, 'importLogs']);
|
|
|
|
|
$router->get('/api/tld-info', [TldRegistryController::class, 'apiGetTldInfo']);
|
|
|
|
|
|
2025-10-08 18:54:34 +03:00
|
|
|
// Settings
|
|
|
|
|
$router->get('/settings', [SettingsController::class, 'index']);
|
|
|
|
|
$router->post('/settings/update', [SettingsController::class, 'update']);
|
|
|
|
|
$router->post('/settings/update-app', [SettingsController::class, 'updateApp']);
|
|
|
|
|
$router->post('/settings/update-email', [SettingsController::class, 'updateEmail']);
|
Add CSRF, CAPTCHA, and input validation improvements
Introduces CSRF protection to all sensitive controller actions, integrates configurable CAPTCHA (reCAPTCHA v2/v3, Turnstile) for authentication and registration flows, and centralizes input validation via a new InputValidator helper. Adds new helpers and services for CSRF and CAPTCHA, updates settings and migration for CAPTCHA configuration, and enhances logging and error handling in TLD registry import processes. Also improves validation for user, domain, group, and profile inputs throughout the application.
2025-10-10 00:04:12 +03:00
|
|
|
$router->post('/settings/update-captcha', [SettingsController::class, 'updateCaptcha']);
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
$router->post('/settings/update-two-factor', [SettingsController::class, 'updateTwoFactor']);
|
2025-10-08 18:54:34 +03:00
|
|
|
$router->post('/settings/test-email', [SettingsController::class, 'testEmail']);
|
|
|
|
|
$router->post('/settings/test-cron', [SettingsController::class, 'testCron']);
|
|
|
|
|
$router->post('/settings/clear-logs', [SettingsController::class, 'clearLogs']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/settings/toggle-isolation', [SettingsController::class, 'toggleIsolationMode']);
|
2025-10-08 18:54:34 +03:00
|
|
|
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
// Updates (Admin Only)
|
|
|
|
|
$router->post('/api/updates/check', [UpdateController::class, 'check']);
|
|
|
|
|
$router->post('/settings/updates/apply', [UpdateController::class, 'apply']);
|
|
|
|
|
$router->post('/settings/updates/rollback', [UpdateController::class, 'rollback']);
|
|
|
|
|
$router->post('/settings/updates/preferences', [UpdateController::class, 'savePreferences']);
|
|
|
|
|
$router->post('/settings/updates/channel', [UpdateController::class, 'updateChannel']);
|
|
|
|
|
$router->post('/settings/updates/badge', [UpdateController::class, 'updateBadgePreference']);
|
|
|
|
|
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
// Profile
|
|
|
|
|
$router->get('/profile', [ProfileController::class, 'index']);
|
|
|
|
|
$router->post('/profile/update', [ProfileController::class, 'update']);
|
|
|
|
|
$router->post('/profile/change-password', [ProfileController::class, 'changePassword']);
|
2026-02-01 12:30:16 +02:00
|
|
|
$router->post('/profile/delete', [ProfileController::class, 'delete']);
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
$router->get('/profile/resend-verification', [ProfileController::class, 'resendVerification']);
|
|
|
|
|
$router->post('/profile/logout-other-sessions', [ProfileController::class, 'logoutOtherSessions']);
|
|
|
|
|
$router->post('/profile/logout-session/{sessionId}', [ProfileController::class, 'logoutSession']);
|
2025-10-27 18:13:38 +02:00
|
|
|
$router->post('/profile/upload-avatar', [ProfileController::class, 'uploadAvatar']);
|
|
|
|
|
$router->post('/profile/delete-avatar', [ProfileController::class, 'deleteAvatar']);
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
// Two-Factor Authentication management (protected)
|
|
|
|
|
$router->get('/2fa/setup', [TwoFactorController::class, 'setup']);
|
|
|
|
|
$router->post('/2fa/verify-setup', [TwoFactorController::class, 'verifySetup']);
|
|
|
|
|
$router->get('/2fa/cancel-setup', [TwoFactorController::class, 'cancelSetup']);
|
|
|
|
|
$router->get('/2fa/backup-codes', [TwoFactorController::class, 'backupCodes']);
|
|
|
|
|
$router->post('/2fa/disable', [TwoFactorController::class, 'disable']);
|
|
|
|
|
$router->post('/2fa/regenerate-backup-codes', [TwoFactorController::class, 'regenerateBackupCodes']);
|
|
|
|
|
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
// Notifications
|
|
|
|
|
$router->get('/notifications', [NotificationController::class, 'index']);
|
|
|
|
|
$router->get('/notifications/{id}/mark-read', [NotificationController::class, 'markAsRead']);
|
|
|
|
|
$router->get('/notifications/mark-all-read', [NotificationController::class, 'markAllAsRead']);
|
2026-02-01 12:30:16 +02:00
|
|
|
$router->post('/notifications/{id}/delete', [NotificationController::class, 'delete']);
|
|
|
|
|
$router->post('/notifications/clear-all', [NotificationController::class, 'clearAll']);
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
$router->get('/api/notifications/unread-count', [NotificationController::class, 'getUnreadCount']);
|
|
|
|
|
$router->get('/api/notifications/recent', [NotificationController::class, 'getRecent']);
|
|
|
|
|
|
|
|
|
|
// User Management (Admin Only)
|
|
|
|
|
$router->get('/users', [UserController::class, 'index']);
|
|
|
|
|
$router->get('/users/create', [UserController::class, 'create']);
|
|
|
|
|
$router->post('/users/store', [UserController::class, 'store']);
|
2026-02-09 00:20:17 +02:00
|
|
|
$router->get('/users/{id}', [UserController::class, 'show']);
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->get('/users/{id}/edit', [UserController::class, 'edit']);
|
|
|
|
|
$router->post('/users/{id}/update', [UserController::class, 'update']);
|
|
|
|
|
$router->post('/users/{id}/delete', [UserController::class, 'delete']);
|
|
|
|
|
$router->post('/users/{id}/toggle-status', [UserController::class, 'toggleStatus']);
|
2025-10-10 14:01:19 +03:00
|
|
|
$router->post('/users/bulk-toggle-status', [UserController::class, 'bulkToggleStatus']);
|
|
|
|
|
$router->post('/users/bulk-delete', [UserController::class, 'bulkDelete']);
|
|
|
|
|
|
|
|
|
|
// Error Logs (Admin Only)
|
|
|
|
|
$router->get('/errors', [ErrorLogController::class, 'index']);
|
|
|
|
|
$router->get('/errors/{id}', [ErrorLogController::class, 'show']);
|
|
|
|
|
$router->post('/errors/{id}/resolve', [ErrorLogController::class, 'markResolved']);
|
|
|
|
|
$router->post('/errors/{id}/unresolve', [ErrorLogController::class, 'markUnresolved']);
|
|
|
|
|
$router->post('/errors/{id}/delete', [ErrorLogController::class, 'delete']);
|
|
|
|
|
$router->post('/errors/bulk-delete', [ErrorLogController::class, 'bulkDelete']);
|
|
|
|
|
$router->post('/errors/clear-resolved', [ErrorLogController::class, 'clearResolved']);
|
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)
2025-10-09 18:02:46 +03:00
|
|
|
|
2025-10-25 02:04:00 +03:00
|
|
|
// Tag Management
|
|
|
|
|
$router->get('/tags', [TagController::class, 'index']);
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
$router->get('/tags/export', [TagController::class, 'export']);
|
|
|
|
|
$router->post('/tags/import', [TagController::class, 'import']);
|
2025-10-25 02:04:00 +03:00
|
|
|
$router->post('/tags/create', [TagController::class, 'create']);
|
|
|
|
|
$router->post('/tags/update', [TagController::class, 'update']);
|
|
|
|
|
$router->post('/tags/delete', [TagController::class, 'delete']);
|
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
|
|
|
$router->post('/tags/transfer', [TagController::class, 'transfer']);
|
|
|
|
|
$router->post('/tags/bulk-delete', [TagController::class, 'bulkDelete']);
|
|
|
|
|
$router->post('/tags/bulk-transfer', [TagController::class, 'bulkTransfer']);
|
2025-10-25 02:04:00 +03:00
|
|
|
$router->get('/tags/{id}', [TagController::class, 'show']);
|
|
|
|
|
$router->post('/tags/bulk-add-to-domains', [TagController::class, 'bulkAddToDomains']);
|
|
|
|
|
$router->post('/tags/bulk-remove-from-domains', [TagController::class, 'bulkRemoveFromDomains']);
|
|
|
|
|
|
|
|
|
|
|