From 627a08f718ca5ef6d7a4eb98a33e408ba336c5c2 Mon Sep 17 00:00:00 2001 From: Victor Emanouilov Date: Mon, 18 Nov 2024 13:52:43 +0200 Subject: [PATCH] fix sieve config host parsing - it was missing actual host and returning the full url --- modules/imap/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/imap/functions.php b/modules/imap/functions.php index d3102c35e..7badc0293 100644 --- a/modules/imap/functions.php +++ b/modules/imap/functions.php @@ -1526,9 +1526,10 @@ function forward_dropdown($output,$reply_args) { if (!hm_exists('parse_sieve_config_host')) { function parse_sieve_config_host($host) { $url = parse_url($host); - if(!isset($url['host'])) { - $host = $url['path']; + if ($url === false) { + return $host; } + $host = $url['host'] ?? $url['path']; $port = $url['port'] ?? '4190'; return [$host, $port]; }}