diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-03 19:05:31 -0800 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-03 19:05:31 -0800 |
commit | 95fd2d8d1eaeb02a48039c8d0c3195487bff8957 (patch) | |
tree | defc5028fe6e38541e55ea9da2f04a106edf586c | |
parent | da6e79a381d8213cfd8ce5b7e3895726f815833f (diff) | |
parent | 3def7f81873fef84b781174ad12f7e264b4caae5 (diff) | |
download | nextcloud-server-95fd2d8d1eaeb02a48039c8d0c3195487bff8957.tar.gz nextcloud-server-95fd2d8d1eaeb02a48039c8d0c3195487bff8957.zip |
Merge pull request #1435 from owncloud/make_BlacklistConfigurable
Make file blacklist configurable
-rw-r--r-- | config/config.sample.php | 3 | ||||
-rw-r--r-- | lib/files/filesystem.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 5264e948200..163beaae2f4 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -32,6 +32,9 @@ $CONFIG = array( /* Force use of HTTPS connection (true = use HTTPS) */ "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" */ "overwritehost" => "", diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 262fde320a1..47c09acf294 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -374,7 +374,7 @@ class Filesystem { * @param array $data from hook */ static public function isBlacklisted($data) { - $blacklist = array('.htaccess'); + $blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess')); if (isset($data['path'])) { $path = $data['path']; } else if (isset($data['newpath'])) { |