From 61f950b4730b503323b4f66294625df634359a74 Mon Sep 17 00:00:00 2001 From: Braintelligence Date: Mon, 1 Jul 2019 16:48:01 +0200 Subject: [PATCH] Fix issue #2718 Proposal for a fix of issue #2718 . Strip port from HTTP_HOST per @mkuron proposal: https://github.com/mailcow/mailcow-dockerized/issues/2718#issuecomment-506987422 --- data/web/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/user.php b/data/web/user.php index 7fe37310..a6bbe97d 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -77,7 +77,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == ' $username = $_SESSION['mailcow_cc_username']; $mailboxdata = mailbox('get', 'mailbox_details', $username); - $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . urlencode($_SERVER['HTTP_HOST']) . "&port=" . urlencode($autodiscover_config['caldav']['port']); + $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . strtok(urlencode($_SERVER['HTTP_HOST']), ':') . "&port=" . urlencode($autodiscover_config['caldav']['port']); if ($autodiscover_config['useEASforOutlook'] == 'yes') $clientconfigstr .= "&outlookEAS=1"; if (file_exists('thunderbird-plugins/version.csv')) {