tamu secreto Posted October 26, 2009 Share Posted October 26, 2009 XSS and injection error when using htmlentities ()When someone uses htmlentities (), I've seen over and over again, hopes that the filtration of all variables XSS. This is not true, of course, since the function requires a second parameter ENT_QUOTES replacing characters appointment. Some developers are not even aware that quotes can lead to XSS injection.Prestashop be seen throughout the misuse of htmlentities, a scenario is the login manager - login.php:Tools:: DisplayError ( '- Server :').' b> '. Htmlentities ($ pathServer).should beTools:: DisplayError ( '- Server :').' b> '. Htmlentities ($ pathServer, ENT_QUOTES).saludos en español:Cuando alguien usa htmlentities(), lo he visto una y otra vez, espera que la filtracion de todas las variables de tipo XSS. Esto no es cierto, por supuesto, ya que la función requiere un segundo parámetro ENT_QUOTES que reemplaza a los caracteres de cita. Algunos desarrolladores ni siquiera son conscientes de que las comillas pueden llevar a XSS inyección.En todo prestashop se advierte el mal empleo de htmlentities, un caso de ejemplo es el login administrador – login.php :Tools::displayError(’- Server:’).’‘.htmlentities($pathServer).deberia serTools::displayError(’- Server:’).’‘.htmlentities($pathServer, ENT_QUOTES).saludos!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now