Skip to content

Commit 919e78f

Browse files
committed
Fixes #579 Nested sub path parsing
1 parent bc21928 commit 919e78f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Saml2/Utils.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,10 @@ protected static function buildWithBaseURLPath($info)
722722
if (!empty($baseURLPath)) {
723723
$result = $baseURLPath;
724724
if (!empty($info)) {
725-
$path = explode('/', $info);
726-
$extractedInfo = array_pop($path);
725+
// Remove base path from the path info.
726+
$extractedInfo = str_replace($baseURLPath, '', $info);
727+
// Remove starting and ending slash.
728+
$extractedInfo = trim($extractedInfo, '/');
727729
if (!empty($extractedInfo)) {
728730
$result .= $extractedInfo;
729731
}

0 commit comments

Comments
 (0)