From fe8688bbbc982004b7b69b1e4856d720f07ad75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Mon, 16 Oct 2017 11:24:05 +0200 Subject: [PATCH] Revert "Do not add default ports to self URL when guessing it." This reverts commit 1218f38a300f6acbed1e061bd2beaeccb34bedf6. --- lib/SimpleSAML/Utils/HTTP.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php index 9568d74af..fd01223d7 100644 --- a/lib/SimpleSAML/Utils/HTTP.php +++ b/lib/SimpleSAML/Utils/HTTP.php @@ -780,14 +780,12 @@ class HTTP * It doesn't matter which one of those cases we have. We just know we can't apply our base URL to the * current URI, so we need to build it back from the PHP environment. */ - $https = self::getServerHTTPS(); $protocol = 'http'; - $protocol .= $https ? 's' : ''; + $protocol .= (self::getServerHTTPS()) ? 's' : ''; $protocol .= '://'; $hostname = self::getServerHost(); $port = self::getServerPort(); - $port = ($https && $port !== ':443') || (!$https && $port !== ':80') ? $port : ''; return $protocol.$hostname.$port.$_SERVER['REQUEST_URI']; } -- GitLab