Commit Graph

105 Commits

Author SHA1 Message Date
Hosteroid
db094d6d8b Use Twig-only rendering and improve error fallback
Remove legacy PHP view fallbacks and always render Twig templates (Controller, Router). Update ErrorHandler to attempt Twig rendering and provide a safe, escaped minimal HTML fallback on failure instead of requiring PHP views. Also pass whoisData into the domain view. These changes standardize on Twig templates and harden error output.
2026-03-04 11:16:56 +02:00
Hosteroid
4818172bc6 Switch PHP views to Twig and add 2FA/UI enhancements
Migrate many view templates from raw PHP to Twig and modernize UI/UX for 2FA and settings. Controllers updated to provide avatar data and two-factor info (ProfileController, UserController) and SettingsController now includes timezone lists, notification preset selection, cron path, cached update state and rollback availability. ErrorHandler now attempts to render error pages via a new Core\TwigService with a safe fallback to raw PHP views. TwoFactorService generation silences deprecated warnings during QR code creation. Numerous .php view files were removed and replaced with .twig equivalents (2fa setup/verify/backup-codes and many auth, dashboard, domains, errors, layout, users, tags, tld-registry, etc.), and core/TwigService was added. These changes move the app toward a Twig-based templating system, improve 2FA flows, surface avatar images in lists/profiles, and make error rendering more robust.
2026-03-03 18:21:32 +02:00
Hosteroid
ed3e5739f4 Add TLD registry import/export/create & logging
Add CSV/JSON export and import endpoints and UI for the TLD registry, plus a manual Create TLD modal and drag-and-drop import UX. Standardize import/export logging by adding Logger('import'/'export') calls to Domains, Tags, Notification Groups and TLD flows. Add TldRegistry model helpers (findByTld, getAll) used for deduplication and exports. Update routes for /tld-registry export/import/create and add a migration to bump app_version to 1.1.4. Also update default app_version, enhance WhoisService parsing (registrar regex and ISO-8601 date handling), and adjust the TLD registry index view to include IANA and Export dropdowns, import modal, create modal, and related JS behavior.
2026-03-02 11:17:58 +02:00
Hosteroid
aca4c14b8b Update UpdateController.php 2026-02-11 19:55:56 +02:00
Hosteroid
30a139d765 Handle hotfix updates and stale commit cache
Treat file-only/hotfix updates (identified by commit SHA) as non-version changes and clear stale commit-cache so the UI no longer reports an available update after a hotfix. UpdateService now clears commits_behind_count and latest_remote_sha when no new commits are found. LayoutHelper and settings view consider installed_commit_sha vs latest_remote_sha and set commitsBehind to 0 when they match. NotificationService detects commit SHAs for the target version and emits a clearer "hotfix {sha}" message for file-only updates.
2026-02-11 19:24:39 +02:00
Hosteroid
a7c2ac2e2b Fix update notifications and clear update cache
Handle hotfix upgrade messaging and clear stale update state after applying updates.

- UpdateController: when notifying admins for hotfixes, pass the current app version as the "to" version so notifications read e.g. "v1.1.3 has been updated" instead of showing a commit SHA.
- NotificationService: adjust system upgrade message to show a simple "has been updated" message when fromVersion equals toVersion (hotfix/file updates) and standard "upgraded from X to Y" otherwise; factor migration label formatting.
- UpdateService: clear cached update-check state after a successful update (add clearUpdateCache method) so the UI no longer shows a stale "update available" card. Keep latest_available_version unchanged to avoid view inconsistencies before migrations run.
2026-02-11 18:52:38 +02:00
Hosteroid
67d3fb36b3 Update modal header styling for release/hotfix
Adjust update modal header to match release vs hotfix state. Adds logic to set header background/border, title and subline text colors, and updates release link color classes to use blue for releases and amber for hotfixes. Keeps existing body color toggles intact; this is purely presentational to ensure header matches the modal body.
2026-02-11 18:46:27 +02:00
Hosteroid
4371f174c9 Capture app version and defer notifications
Installer: capture the current app version (fromVersion) before running migrations, with a fallback for very old installs where settings may not exist. Re-read the app version after migrations to determine toVersion and only use migration-based detection as a fallback when the version didn't change.

Update flow: only send admin upgrade notifications when there are no pending migrations. If migrations remain, the user is redirected to the installer which will send the correct notification after migrations complete. This prevents duplicate or incorrect upgrade notifications and ensures accurate from/to version reporting.
2026-02-11 18:44:06 +02:00
Hosteroid
3688c8b71b 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
Hosteroid
ea5696e7eb Update sidebar logo and add logo SVG
Replace the previous icon-based logo in the sidebar with a clickable logo image, app title and subtitle, and adjust spacing/hover styles for better branding and accessibility. Wraps the logo and text in a link to '/' and preserves the mobile close button. Adds the new public/assets/logo.svg asset.
2026-02-09 00:24:40 +02:00
Hosteroid
b3c3f3403c Add user profile & dashboard insights
Introduce a user profile page and expand dashboard insights/UI. Added UserController::show and a new users/show view with user stats, domains, tags and groups; updated users index to include a "view profile" link and changed edit form action to /users/{id}/update. Enhanced DashboardController to compute registrar distribution, notification coverage, channel totals and dashboard tag usage; updated dashboard/index.php to show system status, expiring list, registrar/tag widgets and notification coverage panels. Minor controller hardening: DomainController now returns a permission message when a domain is inaccessible, and TagController enforces isolation-mode access checks. UI/JS improvements: add a Quick Actions dropdown in top-nav, refactor dropdown toggle/close logic in layout/base.php, and small notification markup tweak. Routes were adjusted to expose the new user profile endpoints.
2026-02-09 00:20:17 +02:00
Hosteroid
e334f7c9d6 Add domain status notifications & login alerts
Introduce richer notifications and domain status handling across the app.

- NotificationService: Add domain status alert formatting/sending, in-app notifications for available/registered/redemption/pending_delete, richer session_new and session_failed notifications (geolocation + UA parsing) and helpers for human-readable status labels.
- Auth/TwoFactor: Emit notifications for successful logins (including remember-me and 2FA) and failed login attempts; update last-login timestamp on various flows.
- DomainController: Wrap bulk domain create in try/catch to handle duplicate race conditions and log failures.
- WhoisService: Detect redemption_period and pending_delete statuses from WHOIS/EPP statuses.
- Settings/Setting: Add settings support for notification status triggers and bump default app_version to 1.1.2; persist/update status trigger values.
- Views/Layout/View helpers: Add parsing/formatting for login notification data, add new status labels/classes (available, redemption_period, pending_delete), update notification icons/colors mapping.
- Top-nav & Notifications UI: Enhance dropdown with rich login/failed-login display (flags, device icons), clickable domain redirects when marking read, badge IDs for dynamic updates.
- Error admin UI: Add copy error report button with robust clipboard fallback and toast UI reused from messages; improved copy UX in admin index/detail.
- Installer: Add new migration 024 to installer migration lists and adjust detected toVersion to 1.1.2.
- DB: Add migration file 024_add_status_notifications_v1.1.2.sql (new file).

These changes add user-facing alerts for domain lifecycle events and stronger login/security notifications while improving UI feedback and robustness during bulk operations.
2026-02-08 22:58:59 +02:00
Hosteroid
f32de0a848 Support DD/MM/YYYY WHOIS date parsing
Add handling for European-style dates (DD/MM/YYYY and DD/MM/YYYY HH:MM:SS) before calling strtotime. The code detects a leading DD/MM/YYYY pattern, interprets it as day/month/year when day>12 or when both day and month are <=12 (favoring European format used by many WHOIS servers like .pt, .es, .fr), then converts it to YYYY-MM-DD with any time part preserved. If month>12 the original string is left for strtotime to handle. This improves robust parsing of WHOIS date strings from servers that use day-first formats.
2026-02-03 15:49:50 +02:00
Hosteroid
beaf181aa0 Refactor user create view and add JS validation
Redesign the users/create view: move and center the form inside a card, switch to a responsive grid layout, add icons/placeholders, and improve field styling (username, email, role, passwords). Add client-side features: password show/hide toggles and live password confirmation validation. Replace footer action layout with inline action buttons and add an informational panel explaining post-creation behavior. Cosmetic/tailwind updates including container width change to max-w-3xl and small accessibility/UX improvements (autofocus, input hints).
2026-02-01 12:51:41 +02:00
Hosteroid
8b71c5729c Add webhook formats and Google Chat support
Introduce selectable webhook payload formats and Google Chat rich-card support. NotificationGroupController now reads and validates a webhook_format option (generic, google_chat, simple_text) and logs a warning if Google Chat format is chosen but the URL does not look like chat.googleapis.com. WebhookChannel gains format constants, a payload builder (generic/simple text/Google Chat card), improved Content-Type header, enhanced logging with masked URLs, response truncation, payload previews, and better RequestException handling. Views updated to expose a Webhook Format dropdown, contextual help (including Google Chat setup instructions), dynamic placeholders/help text, and include the selected format when testing/saving webhooks. These changes add format flexibility and improve observability and safety when sending webhook notifications.
2026-02-01 12:40:02 +02:00
Hosteroid
612a4bf790 Use POST for destructive actions & mobile UI tweaks
Require POST and CSRF verification for destructive endpoints (profile delete, notification delete, clear-all) and update routes accordingly. Replace GET-based delete links with POST forms (including csrf_field()) and add hidden form submission for "clear all" and account deletion via JS. Add server-side request method checks and verifyCsrf() calls in NotificationController and ProfileController. Improve mobile UX: add sidebar overlay, open/close controls (including swipe-to-close), close button, prevent body scroll when sidebar open, responsive search placeholder and adjusted search/top-nav styling, and minor layout tweaks (truncate app name, adjust notification dropdown width). Also minor whitespace/formatting cleanups.
2026-02-01 12:30:16 +02:00
Sylvano
8419f3b79e Update app/Views/groups/index.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-30 02:10:49 +01:00
Sylvano Plocic
25dcdab4b0 fix: notification group delete func GET to POST 2026-01-30 01:49:37 +01:00
Hosteroid
686f6f7528 Improve error log deduplication and occurrence tracking
Enhanced error deduplication by matching on type, file, line, and message. Updated error occurrence counting and admin stats to reflect deduplicated errors. Refactored error resolution and deletion to operate on all matching errors. Improved error occurrence display in the admin detail view for clarity and accuracy.
2026-01-08 14:19:09 +02:00
Hosteroid
24d5479dcf Add in-app notifications for domain expiration alerts
Implemented logic to create in-app (bell icon) notifications for users when domains are expiring or have expired. The notification recipients are determined by the user isolation mode: in isolated mode, only the domain owner (or group owner) is notified; in shared mode, all active users receive the notification. This applies to both the main check and the retry queue.
2025-12-18 14:37:15 +02:00
Hosteroid
1e98b8a047 Enhance user actions with CSRF protection and POST requests
Added CSRF protection and enforced POST requests for user delete and toggle status actions in UserController. Updated the users index view to use JavaScript for submitting POST forms with CSRF tokens for these actions, improving security and user experience. Also improved login success messages to include the user's full name.
2025-12-15 17:48:55 +02:00
Hosteroid
bcd956a495 Add rate limit handling and retry logic for WHOIS lookups
Implements detection of rate limiting in WHOIS and RDAP responses in WhoisService, tracks last error type, and exposes methods to check and clear rate limit errors. Updates check_domains.php to queue domains that fail due to rate limits for retry with exponential backoff, grouped by TLD to avoid repeated rate limiting. Adds statistics and logging for retries and successful retry attempts, and introduces delays between checks and retries to reduce the likelihood of hitting rate limits.
2025-11-21 19:39:51 +02:00
Hosteroid
a7321888c0 Add admin editing for WHOIS and RDAP servers in TLD registry
Introduces controller actions and UI modals for admins to edit WHOIS and RDAP servers for TLDs. Updates redirect logic to return users to the correct page after actions. Adds new POST routes for updating WHOIS and RDAP servers. Improves clipboard copy feedback in the debug WHOIS view.
2025-11-21 14:49:41 +02:00
Hosteroid
e2be1ef33c Add Pushover support and avatar uploads directory setup
Introduces Pushover as a notification channel with validation and form handling in the group edit view. Also updates the bootstrap script to create and set permissions for the avatar uploads directory.
2025-11-18 18:34:05 +02:00
Hosteroid
2b4035dd29 Add Pushover notification channel and improve status detection
Introduces Pushover as a new notification channel with priority-based alerts, device targeting, and custom sounds. Enhances domain status detection for .nl and .eu domains, ensuring accurate handling when expiration dates or explicit status flags are missing. Fixes PHP 8.x compatibility issues with null parameters in date functions and improves error handling and logging by replacing error_log() with a centralized Logger service. Updates documentation and migrations for version 1.1.1.
2025-11-18 13:22:49 +02:00
Hosteroid
86d4cb0af6 Update EmailHelper.php 2025-10-30 11:22:53 +02:00
Hosteroid
ad54d6d6ea Update Domain.php 2025-10-29 19:43:50 +02:00
Hosteroid
5c79cc7c15 Update Domain.php 2025-10-29 13:13:56 +02:00
Hosteroid
a0ada0b2c2 Fixed docker errors and improved error logging.. 2025-10-29 12:45:01 +02:00
Hosteroid
63a8e208c2 Update Domain.php 2025-10-29 01:29:17 +02:00
Hosteroid
67bacc36e3 Add user avatar system and fix WHOIS parsing/cron synchronization
- Add avatar upload with Gravatar fallback and initials
- Fix false "available" detection for registered domains
- Clean up WHOIS status parsing and server display
- Update cron job to sync all WHOIS fields
- Fix TLD cache and .me domain parsing issues
2025-10-27 18:13:38 +02:00
Hosteroid
bbb1be1cf5 Fixing mattermost logo 2025-10-25 13:13:56 +03:00
Hosteroid
d76e9d9473 Update DomainController.php
Fixing old Tags system code
2025-10-25 12:40:47 +03:00
Hosteroid
06596b8044 Replace comma-separated tags with relational tag system.
- Add tags and domain_tags tables
- Support tag management
- Support user isolation (global/private tags)
- Add filtering all domain views to operations
- Update all domain views automatically
2025-10-25 02:04:00 +03:00
Hosteroid
fa0167bf71 Update Setting.php 2025-10-23 00:18:16 +03:00
Hosteroid
02d4c1c5ad Update DomainController.php 2025-10-22 18:59:05 +03:00
Hosteroid
0229f64f4e Implementing Manual Expiration Dates 2025-10-21 16:13:58 +03:00
Hosteroid
c2684b8cc4 More improvements on WhoisService 2025-10-21 15:40:54 +03:00
Hosteroid
716fdcffe6 Improved error logging for Domain refresh 2025-10-21 15:16:56 +03:00
Hosteroid
ceeb2cfae4 Improve RDAP domain availability detection
Enhanced RDAP response handling to better detect domain availability by checking for 'free' and 'available' statuses in DebugController. WhoisService now normalizes 'free' status to 'AVAILABLE' for consistency in output.
2025-10-21 15:12:19 +03:00
Hosteroid
1ff5bdd5c1 Update WhoisService.php 2025-10-21 15:09:03 +03:00
Hosteroid
61222ece7c Update WhoisService.php 2025-10-21 15:05:33 +03:00
Hosteroid
221e0b83f0 Update WhoisService.php 2025-10-21 15:02:15 +03:00
Hosteroid
685a641873 Update WhoisService.php 2025-10-21 14:54:39 +03:00
Hosteroid
92319b27f7 Add vCard field validation in WhoisService
Added checks to ensure vCard fields are arrays with at least 4 elements before accessing their values. This prevents potential errors when parsing registrar and abuse contact information from RDAP responses.
2025-10-21 14:51:28 +03:00
Hosteroid
430bd81cb9 Expand WHOIS domain availability checks
Added 'does not exist' and 'queried object does not exist' to the regex for detecting available domains in WHOIS responses, improving coverage for more registrar messages.
2025-10-21 14:40:39 +03:00
Hosteroid
774379f107 Add Mattermost notification channel support
Introduces Mattermost as a new notification channel, including backend service integration, controller validation, UI form fields, and updates to channel type enums in the database schema and migrations. This enables users to configure and send notifications via Mattermost webhooks.
2025-10-21 14:33:22 +03:00
Hosteroid
ec0b5c61ea Switch channel actions to POST forms and add group_id handling
Replaced channel toggle and delete links with POST forms including CSRF protection for better security. Added a hidden group_id input to the channel creation form and improved JavaScript to reliably obtain group_id from the form or URL. Also added support for 'webhook' channel type in the testChannel function.
2025-10-21 13:53:10 +03:00
Hosteroid
21eeda7127 Add webhook channel type to notification channels
Introduces 'webhook' as a new channel_type option in the notification_channels table to support custom webhook integrations. Updates migration logic and adds a new migration script for this schema change.
2025-10-21 13:33:01 +03:00
Hosteroid
5e4f9e6704 Replace error_log with logger in TldRegistryService
Updated all error and warning logging in TldRegistryService to use the injected logger instead of error_log. This improves consistency and allows for better log management and integration with application logging systems.
2025-10-21 10:36:41 +03:00