Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
29b63583
Unverified
Commit
29b63583
authored
5 years ago
by
Jaime Pérez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken web server aliases / rewritten URLs
This resolves #1023, resolves #1093 and closes #1095.
parent
b278b2b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Module.php
+10
-2
10 additions, 2 deletions
lib/SimpleSAML/Module.php
with
10 additions
and
2 deletions
lib/SimpleSAML/Module.php
+
10
−
2
View file @
29b63583
...
...
@@ -133,7 +133,7 @@ class Module
throw
new
Error\NotFound
(
'No PATH_INFO to module.php'
);
}
$url
=
$request
->
getPathInfo
(
);
$url
=
$request
->
server
->
get
(
'PATH_INFO'
);
assert
(
substr
(
$url
,
0
,
1
)
===
'/'
);
/* clear the PATH_INFO option, so that a script can detect whether it is called with anything following the
...
...
@@ -168,10 +168,18 @@ class Module
}
$config
=
Configuration
::
getInstance
();
// rebuild REQUEST_URI and SCRIPT_NAME just in case we need to. This is needed for server aliases and rewrites
$translated_uri
=
$config
->
getBasePath
()
.
'module.php/'
.
$module
.
'/'
.
$url
;
$request
->
server
->
set
(
'REQUEST_URI'
,
$translated_uri
);
$request
->
server
->
set
(
'SCRIPT_NAME'
,
$config
->
getBasePath
()
.
'module.php'
);
$request
->
initialize
(
$request
->
query
->
all
(),
$request
->
request
->
all
(),
$request
->
attributes
->
all
(),
$request
->
cookies
->
all
(),
$request
->
files
->
all
(),
$request
->
server
->
all
(),
$request
->
getContent
());
if
(
$config
->
getBoolean
(
'usenewui'
,
false
)
===
true
)
{
$router
=
new
Router
(
$module
);
try
{
return
$router
->
process
();
return
$router
->
process
(
$request
);
}
catch
(
FileLocatorFileNotFoundException
$e
)
{
// no routes configured for this module, fall back to the old system
}
catch
(
NotFoundHttpException
$e
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment