* adjust code for bug #806.

This commit is contained in:
chenfeiCF
2016-03-23 09:52:11 +08:00
parent a93628962e
commit 0339c69ec6
+1 -1
View File
@@ -163,7 +163,7 @@ class fileModel extends model
public function getExtension($filename)
{
$extension = trim(strtolower(pathinfo($filename, PATHINFO_EXTENSION)));
if(empty($extension) or strpos($this->config->file->dangers, $extension) !== false) return 'txt';
if(empty($extension) or strpos(",{$this->config->file->dangers},", ",{$extension},") !== false) return 'txt';
if($extension == 'php') return 'txt';
return $extension;
}