From 9f772bc9184f1b9def9d99f39bc7cd5cc10c16e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Tue, 28 Apr 2020 10:56:56 +0200 Subject: [PATCH] ambulance: fix(core) Escape HTML in fatal error messages Fixes third XSS from audit FSA-0021 issue #6135 --- include/class_msg_dialog.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/class_msg_dialog.inc b/include/class_msg_dialog.inc index b38f2b3f1..800a3c28a 100644 --- a/include/class_msg_dialog.inc +++ b/include/class_msg_dialog.inc @@ -169,12 +169,12 @@ class msg_dialog '<table style="width:100%; border:2px solid red;"> <tr> <td style="vertical-align:top;padding:10px"> - <img src="geticon.php?context=status&icon=dialog-error&size=32" alt="'._('Error').'"/> + <img src="geticon.php?context=status&icon=dialog-error&size=32" alt="'.htmlentities(_('Error'), ENT_COMPAT, 'UTF-8').'"/> </td> <td style="width:100%"> - <b>'.$this->s_Title.'</b><br/> - '.$this->s_Message.'<br><br/> - '._('Please fix the above error and reload the page.').' + <b>'.htmlentities($this->s_Title, ENT_COMPAT, 'UTF-8').'</b><br/> + '.htmlentities($this->s_Message, ENT_COMPAT, 'UTF-8').'<br><br/> + '.htmlentities(_('Please fix the above error and reload the page.'), ENT_COMPAT, 'UTF-8').' </td> </tr> </table></body></html>'; -- GitLab