Skip to content

Commit

Permalink
Trying to get rid of the trailing-slash restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Aug 9, 2019
1 parent 758b584 commit 8540474
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/SimpleSAML/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,12 @@ public static function process(Request $request = null)

$modEnd = strpos($url, '/', 1);
if ($modEnd === false) {
// the path must always be on the form /module/
throw new Error\NotFound('The URL must at least contain a module name followed by a slash.');
}

$module = substr($url, 1, $modEnd - 1);
$url = substr($url, $modEnd + 1);
if ($url === false) {
$modEnd = strlen($url);
$module = substr($url, 1);
$url = '';
} else {
$module = substr($url, 1, $modEnd - 1);
$url = substr($url, $modEnd + 1);
}

if (!self::isModuleEnabled($module)) {
Expand Down

0 comments on commit 8540474

Please sign in to comment.