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
f7104c8b
Commit
f7104c8b
authored
2 years ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Throw an exception when configured theme controller is invalid
parent
5d16bc93
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
src/SimpleSAML/XHTML/Template.php
+13
-7
13 additions, 7 deletions
src/SimpleSAML/XHTML/Template.php
with
13 additions
and
7 deletions
src/SimpleSAML/XHTML/Template.php
+
13
−
7
View file @
f7104c8b
...
@@ -165,13 +165,19 @@ class Template extends Response
...
@@ -165,13 +165,19 @@ class Template extends Response
// check if we need to attach a theme controller
// check if we need to attach a theme controller
$controller
=
$this
->
configuration
->
getOptionalString
(
'theme.controller'
,
null
);
$controller
=
$this
->
configuration
->
getOptionalString
(
'theme.controller'
,
null
);
if
(
if
(
$controller
!==
null
)
{
$controller
!==
null
if
(
&&
class_exists
(
$controller
)
class_exists
(
$controller
)
&&
in_array
(
TemplateControllerInterface
::
class
,
class_implements
(
$controller
))
&&
in_array
(
TemplateControllerInterface
::
class
,
class_implements
(
$controller
))
)
{
)
{
/** @var \SimpleSAML\XHTML\TemplateControllerInterface $this->controller */
/** @var \SimpleSAML\XHTML\TemplateControllerInterface $this->controller */
$this
->
controller
=
new
$controller
();
$this
->
controller
=
new
$controller
();
}
else
{
throw
new
Error\ConfigurationError
(
'Invalid controller was configured in `theme.controller`. '
.
' Make sure the class exists and implements the TemplateControllerInterface.'
);
}
}
}
$this
->
fileSystem
=
new
Filesystem
();
$this
->
fileSystem
=
new
Filesystem
();
...
...
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