diff options
author | cash <cash.costello@gmail.com> | 2012-01-30 20:55:52 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2012-01-30 20:55:52 -0500 |
commit | e7b2f4f1e68b1c3539f26fc917da04dc8f2a52cc (patch) | |
tree | fecc9d81812d70d6a63fd4ad46d9ce7fc7e042a8 /install/ElggInstaller.php | |
parent | 2a581392174a61b930f8a3fd384454233f26939b (diff) | |
download | elgg-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.php | 15 |
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'])); |