aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-30 20:55:52 -0500
committercash <cash.costello@gmail.com>2012-01-30 20:55:52 -0500
commite7b2f4f1e68b1c3539f26fc917da04dc8f2a52cc (patch)
treefecc9d81812d70d6a63fd4ad46d9ce7fc7e042a8 /install/ElggInstaller.php
parent2a581392174a61b930f8a3fd384454233f26939b (diff)
downloadelgg-e7b2f4f1e68b1c3539f26fc917da04dc8f2a52cc.tar.gz
elgg-e7b2f4f1e68b1c3539f26fc917da04dc8f2a52cc.tar.bz2
Refs #4324 installer checks for absolute path
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 94709ac4e..03c84a43e 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -1337,6 +1337,21 @@ class ElggInstaller {
}
}
+ // check that data root is absolute path
+ if (stripos(PHP_OS, 'win') === 0) {
+ if (strpos($submissionVars['dataroot'], ':') !== 1) {
+ $msg = elgg_echo('install:error:relative_path', array($submissionVars['dataroot']));
+ register_error($msg);
+ return FALSE;
+ }
+ } else {
+ if (strpos($submissionVars['dataroot'], '/') !== 0) {
+ $msg = elgg_echo('install:error:relative_path', array($submissionVars['dataroot']));
+ register_error($msg);
+ return FALSE;
+ }
+ }
+
// check that data root exists
if (!file_exists($submissionVars['dataroot'])) {
$msg = elgg_echo('install:error:datadirectoryexists', array($submissionVars['dataroot']));