-2
Hello folks I am suffering a lot with php Injection and I believe that the vulnerability is in the codes below will be that could help me to end this.
<?php $page = ($_GET['loadpage'] == "") ? "main" : stripslashes($_GET['loadpage']);
?>
<div id="centro">
<?
if(file_exists($page.".html")){
include($page.".html");
}else{
echo '<div class="completo"><div class="inner_box" align="center">Página não encontrada</div></div>';
}
?>
</div>
Taffarel I did not understand very well the use of filters should replace my code by the one you put in the example?
– Willian
Yes, you can replace it. I advise you to read the PHP filtering documentation. https://www.php.net/manual/en/function.filter-input.php
– Taffarel Xavier