diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-09-19 20:21:28 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-09-28 21:57:20 +0200 |
commit | e4325b1517c3d9769c8e0141e37b2845bf8e4d09 (patch) | |
tree | e16af52e1a9ce4a56693e4fe4eb01cbc5112fb86 /application/ThemeUtils.php | |
parent | 0cba184cf80423d990aba09a2a0a1f2b9c5882b7 (diff) | |
download | Shaarli-e4325b1517c3d9769c8e0141e37b2845bf8e4d09.tar.gz Shaarli-e4325b1517c3d9769c8e0141e37b2845bf8e4d09.tar.zst Shaarli-e4325b1517c3d9769c8e0141e37b2845bf8e4d09.zip |
Robustness: safer RainTPL directory handling
Relates to https://github.com/shaarli/Shaarli/issues/845
Relates to https://github.com/shaarli/Shaarli/issues/846
Relates to https://github.com/shaarli/Shaarli/pull/909
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/ThemeUtils.php')
-rw-r--r-- | application/ThemeUtils.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/application/ThemeUtils.php b/application/ThemeUtils.php index 2718ed13..16f2f6a2 100644 --- a/application/ThemeUtils.php +++ b/application/ThemeUtils.php | |||
@@ -22,6 +22,7 @@ class ThemeUtils | |||
22 | */ | 22 | */ |
23 | public static function getThemes($tplDir) | 23 | public static function getThemes($tplDir) |
24 | { | 24 | { |
25 | $tplDir = rtrim($tplDir, '/'); | ||
25 | $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR); | 26 | $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR); |
26 | $themes = []; | 27 | $themes = []; |
27 | foreach ($allTheme as $value) { | 28 | foreach ($allTheme as $value) { |