From f21cba1eb2fd60a8ea5ee7471a089a9107ec7b03 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 31 Oct 2011 13:12:10 +0000 Subject: [PATCH] Utilities: Fix selfURLhost with non-standard port number. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2968 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Utilities.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index b5bdbb13b..a9c7bfc03 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -67,14 +67,14 @@ class SimpleSAML_Utilities { /** - * Will return https://sp.example.org + * Will return https://sp.example.org[:PORT] */ public static function selfURLhost() { $url = self::getBaseURL(); $start = strpos($url,'://') + 3; - $length = strcspn($url,'/:',$start) + $start; + $length = strcspn($url,'/',$start) + $start; return substr($url, 0, $length); } -- GitLab