Fix XSS security hole on comments
parent
f861ea764c
commit
b19b0f5d72
|
|
@ -101,7 +101,9 @@ class Conexion_Mysql {
|
||||||
|
|
||||||
foreach ($datos as $llave=>$valor) {
|
foreach ($datos as $llave=>$valor) {
|
||||||
|
|
||||||
$cols .= "$llave,";
|
$cols .= "$llave,";
|
||||||
|
|
||||||
|
$valor = htmlspecialchars($valor,ENT_QUOTES);
|
||||||
|
|
||||||
$tipo_col = $this->obtenerTipoCampo($tabla, $llave); // obtiene el tipo de campo
|
$tipo_col = $this->obtenerTipoCampo($tabla, $llave); // obtiene el tipo de campo
|
||||||
if (!$tipo_col) return false; // error!
|
if (!$tipo_col) return false; // error!
|
||||||
|
|
@ -154,6 +156,8 @@ class Conexion_Mysql {
|
||||||
foreach ($datos as $llave=>$valor) {
|
foreach ($datos as $llave=>$valor) {
|
||||||
$sql .= " $llave=";
|
$sql .= " $llave=";
|
||||||
|
|
||||||
|
$valor = htmlspecialchars($valor,ENT_QUOTES);
|
||||||
|
|
||||||
$tipo_col = $this->obtenerTipoCampo($tabla, $llave); // obtiene el tipo de campo
|
$tipo_col = $this->obtenerTipoCampo($tabla, $llave); // obtiene el tipo de campo
|
||||||
if (!$tipo_col) return false; // error!
|
if (!$tipo_col) return false; // error!
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue