From: Bart Visscher Date: Tue, 13 Nov 2012 07:54:19 +0000 (+0100) Subject: Use util function to protect datadirectory in setup X-Git-Tag: v5.0.0alpha1~456 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ad85087fccf52ab68899b38b8bab28c0d17b673d;p=nextcloud-server.git Use util function to protect datadirectory in setup --- diff --git a/core/setup.php b/core/setup.php index 1c03e3397af..7a5c6d5f3e0 100644 --- a/core/setup.php +++ b/core/setup.php @@ -18,9 +18,8 @@ $hasPostgreSQL = is_callable('pg_connect'); $hasOracle = is_callable('oci_connect'); $datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data'); -// Test if .htaccess is working -$content = "deny from all"; -file_put_contents(OC::$SERVERROOT.'/data/.htaccess', $content); +// Protect data directory here, so we can test if the protection is working +OC_Setup::protectDataDirectory(); $opts = array( 'hasSQLite' => $hasSQLite,