Skip to content
Snippets Groups Projects
Commit ad85087f authored by Bart Visscher's avatar Bart Visscher
Browse files

Use util function to protect datadirectory in setup

parent ac22cd4a
Branches
No related tags found
No related merge requests found
...@@ -18,9 +18,8 @@ $hasPostgreSQL = is_callable('pg_connect'); ...@@ -18,9 +18,8 @@ $hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect'); $hasOracle = is_callable('oci_connect');
$datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data'); $datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data');
// Test if .htaccess is working // Protect data directory here, so we can test if the protection is working
$content = "deny from all"; OC_Setup::protectDataDirectory();
file_put_contents(OC::$SERVERROOT.'/data/.htaccess', $content);
$opts = array( $opts = array(
'hasSQLite' => $hasSQLite, 'hasSQLite' => $hasSQLite,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment