From 7112fafa8bf76872475ae2dd48acbaf718d175cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= <jorn.dejong@uninett.no> Date: Wed, 11 Sep 2019 11:23:03 +0200 Subject: [PATCH] Replace trim with ltrim/rtrim in getProcessedURL --- lib/SimpleSAML/Auth/Simple.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php index 769c0ab55..2bfa424ec 100644 --- a/lib/SimpleSAML/Auth/Simple.php +++ b/lib/SimpleSAML/Auth/Simple.php @@ -377,7 +377,7 @@ class Simple $scheme = parse_url($url, PHP_URL_SCHEME); $host = parse_url($url, PHP_URL_HOST) ? : Utils\HTTP::getSelfHost(); $port = parse_url($url, PHP_URL_PORT) ? : ( - $scheme ? '' : trim(Utils\HTTP::getServerPort(), ':') + $scheme ? '' : ltrim(Utils\HTTP::getServerPort(), ':') ); $scheme = $scheme ? : (Utils\HTTP::getServerHTTPS() ? 'https' : 'http'); $path = parse_url($url, PHP_URL_PATH) ? : '/'; @@ -394,7 +394,7 @@ class Simple return $scheme.'://'.$host.$port.$path.($query ? '?'.$query : '').($fragment ? '#'.$fragment : ''); } - $base = trim($this->app_config->getString( + $base = rtrim($this->app_config->getString( 'baseURL', $scheme.'://'.$host.$port ), '/'); -- GitLab