Merge branch 'ent-5691-Vulnerabilidad-XSS-en-sistema-de-mensajes' into 'develop'

fix cross-site scripting vulnerability

See merge request artica/pandorafms!3156
This commit is contained in:
Alejandro Fraguas 2020-04-14 15:36:48 +02:00
commit 254a32be22
1 changed files with 1 additions and 11 deletions

View File

@ -127,17 +127,7 @@ if ($read_message) {
).' '.$user_name;
}
$order = [
"\r\n",
"\n",
"\r",
];
$replace = '<br />';
$parsed_message = str_replace(
$order,
$replace,
trim(io_safe_output($row['message']))
);
$parsed_message = nl2br(htmlspecialchars(trim(io_safe_output($row['message']))));
echo '<div class="container">';
echo ' <p>'.$parsed_message.'</p>';