|
|
@ -372,13 +372,21 @@ class OC_Filesystem{ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* checks if a file is blacklsited for storage in the filesystem |
|
|
|
* checks if a file is blacklsited for storage in the filesystem |
|
|
|
|
|
|
|
* Listens to write and rename hooks |
|
|
|
* @param array $data from hook |
|
|
|
* @param array $data from hook |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static public function isBlacklisted($data){ |
|
|
|
static public function isBlacklisted($data){ |
|
|
|
$blacklist = array('.htaccess'); |
|
|
|
$blacklist = array('.htaccess'); |
|
|
|
$filename = strtolower(basename($data['path'])); |
|
|
|
if (isset($data['path'])) { |
|
|
|
if(in_array($filename,$blacklist)){ |
|
|
|
$path = $data['path']; |
|
|
|
$data['run'] = false; |
|
|
|
} else if (isset($data['newpath'])) { |
|
|
|
|
|
|
|
$path = $data['newpath']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (isset($path)) { |
|
|
|
|
|
|
|
$filename = strtolower(basename($path)); |
|
|
|
|
|
|
|
if (in_array($filename, $blacklist)) { |
|
|
|
|
|
|
|
$data['run'] = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|