Re: VULNERABILIDAD GRAVE POR MAL USO

From: Date: Sat, 31 Jan 2004 18:26:30 +0000
Subject: Re: VULNERABILIDAD GRAVE POR MAL USO
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-45066@lists.php.net to get a copy of this message
Ya se ha hablado del tema en esta lista, y en el propio manula tambien hay algunas recomendaciones... Yo utilizo un esquema similar a esto: <? $_REQUEST_METHOD = '_' . $_SERVER['REQUEST_METHOD']; if (!array_key_exists('command', $$_REQUEST_METHOD)) { include('index.inc.php'); } else { switch($_SERVER['REQUEST_METHOD']) { case 'GET': switch($_GET['command']) { case 'comando1': include('cosas1.inc.php'); break; case 'comando1': include('cosas1.inc.php'); break; default: header('Location: ./'); } break; case 'POST': switch($_POST['command']) { case 'comando1': include('cosas1.inc.php'); break; case 'comando1': include('cosas1.inc.php'); break; default: header('Location: ./'); } break; default: header('Location: ./'); } } ?> Es decir, nunca va en ningún get ni post el nombre de ningún fichero, bueno podria poner un comando1.inc.php pero eso es independiente porque lo que no hago es un include de ninguna variable. Saludos

« previous php.general.es (#45066) next »