diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b9d3283..bce08774c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ This file documents all notable changes made to ITFlow. +## [26.08.2] Maint Release + +### Upgrading to 26.08.2 + +Update the files from Settings > Update as normal. There is no database change in this release, so nothing else is required. + +### Bug Fixes +- Calendar: fixed the agent calendar showing no events. +- Calendar: shared calendar feeds set to publish busy blocks only were publishing full event titles, locations and descriptions to anyone holding the subscription link. +- Cron: fixed Maintenance > Cron failing to load. Scheduled jobs themselves were unaffected and kept running. +- Exports: restored the missing columns on the ticket, quote, recurring invoice, software and user exports. +- API: restored the full record on the credentials list endpoint. +- Mail: switching an existing install from Standard SMTP/IMAP to Microsoft 365 or Google OAuth no longer leaves the old mail server behind, which stopped sending and ticket email fetching from working. The connection settings for OAuth providers are now fixed by the provider and cleared on save. + + ## [26.08.1] Maint Release ### Upgrading to 26.08.1 diff --git a/admin/cron.php b/admin/cron.php index 620c6e528..b2556072f 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -22,7 +22,9 @@ foreach (cronJobRegistry() as $job) { $cron_jobs[$job['name']]['row'] = null; } -$sql = mysqli_query($mysqli, "SELECT cron_job_name FROM cron_jobs"); +$sql = mysqli_query($mysqli, "SELECT cron_job_daily_at, cron_job_enabled, cron_job_id, cron_job_interval_minutes, + cron_job_last_duration, cron_job_last_error, cron_job_last_error_at, cron_job_last_run_at, cron_job_last_status, + cron_job_name, cron_job_run_now, cron_job_schedule FROM cron_jobs"); while ($job_row = mysqli_fetch_assoc($sql)) { if (isset($cron_jobs[$job_row['cron_job_name']])) { $cron_jobs[$job_row['cron_job_name']]['row'] = $job_row; diff --git a/admin/post/settings_mail.php b/admin/post/settings_mail.php index f22ffd61b..21a7df080 100644 --- a/admin/post/settings_mail.php +++ b/admin/post/settings_mail.php @@ -91,6 +91,18 @@ if (isset($_POST['edit_mail_smtp_settings'])) { $config_smtp_username = escapeSql($_POST['config_smtp_username'] ?? $config_smtp_username); $config_smtp_password = escapeSql($_POST['config_smtp_password'] ?? $config_smtp_password); + // The host/port/encryption/password inputs are hidden and disabled for OAuth + // providers, so they never post and the ?? fallbacks above keep whatever the + // install used before. Clear them instead: the endpoint is fixed by provider, + // and the stored values would otherwise be both wrong and unreachable from + // the settings page. The mailbox password is no longer used either. + if ($config_smtp_provider === 'google_oauth' || $config_smtp_provider === 'microsoft_oauth') { + $config_smtp_host = ''; + $config_smtp_port = 0; + $config_smtp_encryption = ''; + $config_smtp_password = ''; + } + mysqli_query($mysqli, " UPDATE settings SET config_smtp_provider = '$config_smtp_provider', @@ -121,6 +133,15 @@ if (isset($_POST['edit_mail_imap_settings'])) { $config_imap_username = escapeSql($_POST['config_imap_username'] ?? $config_imap_username); $config_imap_password = escapeSql($_POST['config_imap_password'] ?? $config_imap_password); + // Same as the SMTP handler above - the connection fields are hidden for OAuth + // providers and never post, so drop the leftovers rather than carrying them. + if ($config_imap_provider === 'google_oauth' || $config_imap_provider === 'microsoft_oauth') { + $config_imap_host = ''; + $config_imap_port = 0; + $config_imap_encryption = ''; + $config_imap_password = ''; + } + mysqli_query($mysqli, " UPDATE settings SET config_imap_provider = '$config_imap_provider', @@ -259,26 +280,17 @@ if (isset($_POST['test_email_imap'])) { $is_oauth = ($provider === 'google_oauth' || $provider === 'microsoft_oauth'); + // Override, don't default - a leftover standard-IMAP host from before the + // switch to OAuth would otherwise make this test fail against the old server + // while the cron parser (which overrides unconditionally) connects fine. if ($provider === 'google_oauth') { - if (empty($host)) { - $host = 'imap.gmail.com'; - } - if (empty($port)) { - $port = 993; - } - if (empty($encryption)) { - $encryption = 'ssl'; - } + $host = 'imap.gmail.com'; + $port = 993; + $encryption = 'ssl'; } elseif ($provider === 'microsoft_oauth') { - if (empty($host)) { - $host = 'outlook.office365.com'; - } - if (empty($port)) { - $port = 993; - } - if (empty($encryption)) { - $encryption = 'ssl'; - } + $host = 'outlook.office365.com'; + $port = 993; + $encryption = 'ssl'; } if (empty($host) || empty($port) || empty($username)) { diff --git a/admin/post/users.php b/admin/post/users.php index b670ed8b3..55eaf280f 100644 --- a/admin/post/users.php +++ b/admin/post/users.php @@ -355,7 +355,7 @@ if (isExportRequest('export_users')) { $sql = mysqli_query( $mysqli, - "SELECT user_status FROM users + "SELECT role_name, user_created_at, user_email, user_name, user_status FROM users LEFT JOIN user_roles ON user_role_id = role_id WHERE (user_name LIKE '%$q%' OR user_email LIKE '%$q%') AND user_type = 1 diff --git a/agent/calendar.php b/agent/calendar.php index 09ef36f8f..1d6444178 100644 --- a/agent/calendar.php +++ b/agent/calendar.php @@ -304,8 +304,8 @@ while ($row = mysqli_fetch_assoc($sql)) { }, events: [