Make fileblacklist configurable

This commit is contained in:
Lukas Reschke 2013-02-03 23:03:06 +01:00
parent b8e6b8692b
commit 3def7f8187
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,9 @@ $CONFIG = array(
/* Force use of HTTPS connection (true = use HTTPS) */ /* Force use of HTTPS connection (true = use HTTPS) */
"forcessl" => false, "forcessl" => false,
/* Blacklist a specific file and disallow the upload of files with this name - WARNING: USE THIS ONLY IF YOU KNOW WHAT YOU ARE DOING. */
"blacklisted_files" => array('.htaccess'),
/* The automatic hostname detection of ownCloud can fail in certain reverse proxy situations. This option allows to manually override the automatic detection. You can also add a port. For example "www.example.com:88" */ /* The automatic hostname detection of ownCloud can fail in certain reverse proxy situations. This option allows to manually override the automatic detection. You can also add a port. For example "www.example.com:88" */
"overwritehost" => "", "overwritehost" => "",

View File

@ -374,7 +374,7 @@ class Filesystem {
* @param array $data from hook * @param array $data from hook
*/ */
static public function isBlacklisted($data) { static public function isBlacklisted($data) {
$blacklist = array('.htaccess'); $blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess'));
if (isset($data['path'])) { if (isset($data['path'])) {
$path = $data['path']; $path = $data['path'];
} else if (isset($data['newpath'])) { } else if (isset($data['newpath'])) {