Skip to content

Commit 9c42c47

Browse files
committed
Fix buildWithBaseURLPath, See SAML-Toolkits#581
1 parent ab20c86 commit 9c42c47

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/Saml2/Utils.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,12 @@ protected static function buildWithBaseURLPath($info)
709709
if (!empty($baseURLPath)) {
710710
$result = $baseURLPath;
711711
if (!empty($info)) {
712-
// Remove base path from the path info.
713-
$extractedInfo = str_replace($baseURLPath, '', $info);
712+
$extractedInfo = $info;
713+
if ($baseURLPath != '/') {
714+
// Remove base path from the path info.
715+
$extractedInfo = str_replace($baseURLPath, '', $info);
716+
}
717+
714718
// Remove starting and ending slash.
715719
$extractedInfo = trim($extractedInfo, '/');
716720
if (!empty($extractedInfo)) {

lib/Saml2/version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"php-saml": {
3-
"version": "2.20.0",
4-
"released": "30/05/2024"
3+
"version": "2.21.0",
4+
"released": "25/05/2025"
55
}
66
}

0 commit comments

Comments
 (0)