Skip to content

Commit

Permalink
fix sieve config host parsing - it was missing actual host and return…
Browse files Browse the repository at this point in the history
…ing the full url
  • Loading branch information
kroky committed Nov 18, 2024
1 parent 9e9157c commit 627a08f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/imap/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}}
Expand Down

0 comments on commit 627a08f

Please sign in to comment.