plp050452 / simplesamlphp

Automatically exported from code.google.com/p/simplesamlphp
Other
0 stars 0 forks source link

HTML links problems when using non default TCP ports (non 80 nor 443) #441

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use non default ports for sp and idp (ie different that 443 and 80).
2. correctly specify the baseurlpath in the config/config.php file
3. also correcly specify remote-idp url parameters

What is the expected output? What do you see instead?
several links are not correctly produced (missing :PORT). 
links such as languages, several forms... (esp. when using default-sp)

What version of the product are you using? On what operating system?
latest. r2945
PHP/5.3.6-13ubuntu3.1 

Please provide any additional information below.
Here is my correction suggestion (selfURLhost function)
===================================================================
--- lib/SimpleSAML/Utilities.php    (revision 2945)
+++ lib/SimpleSAML/Utilities.php    (working copy)
@@ -74,7 +74,7 @@
        $url = self::getBaseURL();

        $start = strpos($url,'://') + 3;
-       $length = strcspn($url,'/:',$start) + $start;
+       $length = strcspn($url,'/',$start) + $start;

        return substr($url, 0, $length);
    }

Original issue reported on code.google.com by f...@car-online.fr on 17 Oct 2011 at 10:36

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks you for reporting this bug! I have now committed r2968 with your 
suggested fix.

Original comment by olavmrk@gmail.com on 31 Oct 2011 at 1:13