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
e58285d9
Commit
e58285d9
authored
4 years ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Fix Kernel to properly handle Windows paths
parent
9f561574
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/SimpleSAML/Kernel.php
+3
-2
3 additions, 2 deletions
lib/SimpleSAML/Kernel.php
lib/SimpleSAML/Utils/System.php
+14
-0
14 additions, 0 deletions
lib/SimpleSAML/Utils/System.php
with
17 additions
and
2 deletions
lib/SimpleSAML/Kernel.php
+
3
−
2
View file @
e58285d9
...
@@ -4,6 +4,7 @@ declare(strict_types=1);
...
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace
SimpleSAML
;
namespace
SimpleSAML
;
use
SimpleSAML\Utils\System
;
use
Symfony\Bundle\FrameworkBundle\FrameworkBundle
;
use
Symfony\Bundle\FrameworkBundle\FrameworkBundle
;
use
Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait
;
use
Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait
;
use
Symfony\Component\Config\Exception\FileLocatorFileNotFoundException
;
use
Symfony\Component\Config\Exception\FileLocatorFileNotFoundException
;
...
@@ -51,7 +52,7 @@ class Kernel extends BaseKernel
...
@@ -51,7 +52,7 @@ class Kernel extends BaseKernel
$configuration
=
Configuration
::
getInstance
();
$configuration
=
Configuration
::
getInstance
();
$cachePath
=
$configuration
->
getString
(
'tempdir'
)
.
'/cache/'
.
$this
->
module
;
$cachePath
=
$configuration
->
getString
(
'tempdir'
)
.
'/cache/'
.
$this
->
module
;
if
(
0
===
strpos
(
$cachePath
,
'/'
))
{
if
(
System
::
isAbsolutePath
(
$cachePath
))
{
return
$cachePath
;
return
$cachePath
;
}
}
...
@@ -67,7 +68,7 @@ class Kernel extends BaseKernel
...
@@ -67,7 +68,7 @@ class Kernel extends BaseKernel
$configuration
=
Configuration
::
getInstance
();
$configuration
=
Configuration
::
getInstance
();
$loggingPath
=
$configuration
->
getString
(
'loggingdir'
);
$loggingPath
=
$configuration
->
getString
(
'loggingdir'
);
if
(
0
===
strpos
(
$loggingPath
,
'/'
))
{
if
(
System
::
isAbsolutePath
(
$loggingPath
))
{
return
$loggingPath
;
return
$loggingPath
;
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/SimpleSAML/Utils/System.php
+
14
−
0
View file @
e58285d9
...
@@ -238,6 +238,20 @@ class System
...
@@ -238,6 +238,20 @@ class System
}
}
}
}
/**
* Check if the supplied path is an absolute path.
*
* @param string $path
*
* @return bool
*/
public
static
function
isAbsolutePath
(
string
$path
):
bool
{
return
(
0
===
strpos
(
$path
,
'/'
)
||
self
::
pathContainsDriveLetter
(
$path
));
}
/**
/**
* Check if the supplied path contains a Windows-style drive letter.
* Check if the supplied path contains a Windows-style drive letter.
*
*
...
...
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