From 4cb0d62776378273b73436e37bab9104a81dfd54 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 29 Oct 2013 13:07:01 +0100 Subject: [PATCH] Strip :port from HTTP_HOST when composing an absolute URL (#2444) --- plugins/calendar/calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 9a76a796..813d5edb 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -2273,7 +2273,7 @@ class calendar extends rcube_plugin $schema = 'https'; $default_port = 443; } - $url = $schema . '://' . $_SERVER['HTTP_HOST']; + $url = $schema . '://' . preg_replace('/:\d+$/', '', $_SERVER['HTTP_HOST']); if ($_SERVER['SERVER_PORT'] != $default_port) $url .= ':' . $_SERVER['SERVER_PORT']; if (dirname($_SERVER['SCRIPT_NAME']) != '/')