From 937d656f46cde61b344c73c4f10bb499d59b080a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Sep 2020 23:02:09 +0200 Subject: [PATCH] Fix #yogosha4515 --- htdocs/admin/system/filecheck.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index e1f85ca77ce..88cf39b90a1 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2020 Laurent Destailleur * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2015-2019 Frederic France @@ -195,9 +195,9 @@ if (!$error && $xml) $i++; $out .= ''; $out .= ''.$i.''."\n"; - $out .= ''.$constname.''."\n"; - $out .= ''.$constvalue.''."\n"; - $out .= ''.$valueforchecksum.''."\n"; + $out .= ''.dol_escape_htmltag($constname).''."\n"; + $out .= ''.dol_escape_htmltag($constvalue).''."\n"; + $out .= ''.dol_escape_htmltag($valueforchecksum).''."\n"; $out .= "\n"; } @@ -255,11 +255,11 @@ if (!$error && $xml) $i++; $out .= ''; $out .= ''.$i.''."\n"; - $out .= ''.$file['filename'].''."\n"; + $out .= ''.dol_escape_htmltag($file['filename']).''."\n"; $out .= ''; if (!empty($file['expectedsize'])) $out .= dol_print_size($file['expectedsize']); $out .= ''."\n"; - $out .= ''.$file['expectedmd5'].''."\n"; + $out .= ''.dol_escape_htmltag($file['expectedmd5']).''."\n"; $out .= "\n"; } } else { @@ -294,9 +294,9 @@ if (!$error && $xml) $i++; $out .= ''; $out .= ''.$i.''."\n"; - $out .= ''.$file['filename'].''."\n"; - $out .= ''.$file['expectedmd5'].''."\n"; - $out .= ''.$file['md5'].''."\n"; + $out .= ''.dol_escape_htmltag($file['filename']).''."\n"; + $out .= ''.dol_escape_htmltag($file['expectedmd5']).''."\n"; + $out .= ''.dol_escape_htmltag($file['md5']).''."\n"; $out .= ''; if ($file['expectedsize']) $out .= dol_print_size($file['expectedsize']); $out .= ''."\n"; @@ -346,14 +346,14 @@ if (!$error && $xml) $i++; $out .= ''; $out .= ''.$i.''."\n"; - $out .= ''.$file['filename']; + $out .= ''.dol_escape_htmltag($file['filename']); if (!preg_match('/^win/i', PHP_OS)) { $htmltext = $langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename'] $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i); } $out .= ''."\n"; - $out .= ''.$file['expectedmd5'].''."\n"; - $out .= ''.$file['md5'].''."\n"; + $out .= ''.dol_escape_htmltag($file['expectedmd5']).''."\n"; + $out .= ''.dol_escape_htmltag($file['md5']).''."\n"; $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $totalsize += $size; $out .= ''.dol_print_size($size).''."\n";