aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/ApplicationUtils.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam+github@flibidi.net>2017-09-30 10:56:56 +0200
committerGitHub <noreply@github.com>2017-09-30 10:56:56 +0200
commit7c670b39a2505f625066e7d87e1536fc02e9d6fc (patch)
tree7ffedc72fbf35c7b2721afcf163250a01fa13059 /application/ApplicationUtils.php
parenta59bbf50d7530d7e82a91896a210b9da49cb1568 (diff)
parent8c322aaba197bab1a9992b731db80d9faa133bc4 (diff)
downloadShaarli-7c670b39a2505f625066e7d87e1536fc02e9d6fc.tar.gz
Shaarli-7c670b39a2505f625066e7d87e1536fc02e9d6fc.tar.zst
Shaarli-7c670b39a2505f625066e7d87e1536fc02e9d6fc.zip
Merge pull request #975 from virtualtam/robustness
Improve robustness for zlib and file operations
Diffstat (limited to 'application/ApplicationUtils.php')
-rw-r--r--application/ApplicationUtils.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php
index 85dcbeeb..123cc0b3 100644
--- a/application/ApplicationUtils.php
+++ b/application/ApplicationUtils.php
@@ -168,14 +168,15 @@ class ApplicationUtils
168 public static function checkResourcePermissions($conf) 168 public static function checkResourcePermissions($conf)
169 { 169 {
170 $errors = array(); 170 $errors = array();
171 $rainTplDir = rtrim($conf->get('resource.raintpl_tpl'), '/');
171 172
172 // Check script and template directories are readable 173 // Check script and template directories are readable
173 foreach (array( 174 foreach (array(
174 'application', 175 'application',
175 'inc', 176 'inc',
176 'plugins', 177 'plugins',
177 $conf->get('resource.raintpl_tpl'), 178 $rainTplDir,
178 $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme'), 179 $rainTplDir.'/'.$conf->get('resource.theme'),
179 ) as $path) { 180 ) as $path) {
180 if (! is_readable(realpath($path))) { 181 if (! is_readable(realpath($path))) {
181 $errors[] = '"'.$path.'" directory is not readable'; 182 $errors[] = '"'.$path.'" directory is not readable';