fixed php upload filter to block anything containing php or phtml

This commit is contained in:
alopexc0de 2012-10-09 18:18:18 -04:00
parent 57793480da
commit 2a5ec015d1
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ if (($_FILES["file"]["size"] < 2000000))
}
else
{
if($_FILES["file"]["type"] == "application/x-php"){
if(preg_match('/php/i', $_FILES["file"]["name"]) && preg_match('/phtml/i', $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " is not allowed, sorry about that...";
}else{
move_uploaded_file($_FILES["file"]["tmp_name"],