mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-22 01:32:40 +00:00
fixed php upload filter to block anything containing php or phtml
This commit is contained in:
parent
57793480da
commit
2a5ec015d1
@ -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"],
|
||||
|
Loading…
Reference in New Issue
Block a user