Seguridad del input

From: Date: Tue, 07 Mar 2006 16:02:04 +0000
Subject: Seguridad del input
Groups: php.general.es 
Request: Send a blank email to general-es+get-58141@lists.php.net to get a copy of this message
Buen dia, Buscando la mejor forma de proteger los datos que ingresa el usuario me tope con este conjunto de funciones, http://www.owasp.org/software/labs/phpfilters.html • sanitize_paranoid_string($string) -- input string, returns string stripped of all non alphanumeric characters • sanitize_system_string($string) -- input string, returns string stripped of special characters • sanitize_sql_string($string) -- input string, returns string with slashed out quotes • sanitize_html_string($string) -- input string, returns string with html replacements for special characters • sanitize_int($integer) -- input integer, returns ONLY the integer (no extraneous characters • sanitize_float($float) -- input float, returns ONLY the float (no extraneous characters) • sanitize($input, $flags) -- input any variable, performs sanitization functions specified in flags. flags can be bitwise combination of PARANOID, SQL, SYSTEM, HTML, INT, FLOAT, LDAP, UTF8 Pero al ver el código solo limpia el input con preg_replace, como es esto mas que suficiente? Tengo algunas funciones que he hecho que son de ese tipo, pero no estoy totalmente satisfecho. Que funciones han usado para limpia o filtrar el input del usuario. Cuando busco me topo con información de formas como se pueden explotar XSS, SQL Inyection, entre otros. Pero no muchos ejemplos =( En relación al sql me leí esto, http://www.askbee.net/articles/php/SQL_Injection/sql_injection.html Esta interesante, pero ya lo había leído el resumen aquí en la lista =) Como se evita lo mas posible lo que el usuario ingrese no provoque daño. Saludos, Alejandro Rigalt _________________________________________________________________ Visita MSN Latino Entretenimiento: ¡música, cine, chismes, TV y más....! http://latino.msn.com/entretenimiento/

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