diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 959391fb50..bf6c3f2516 100644 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -61,13 +61,13 @@ if (isset($_POST['backupcount'])) { $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if($_POST['newver'] != "") { if(config_restore($g['conf_path'] . '/backup/config-' . $_POST['newver'] . '.xml') == 0) - $savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['newver']), $confvers[$_POST['newver']]['description']); + $savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['newver']), htmlspecialchars($confvers[$_POST['newver']]['description'])); else $savemsg = gettext("Unable to revert to the selected configuration."); } if($_POST['rmver'] != "") { unlink_if_exists($g['conf_path'] . '/backup/config-' . $_POST['rmver'] . '.xml'); - $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['rmver']),$confvers[$_POST['rmver']]['description']); + $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['rmver']), htmlspecialchars($confvers[$_POST['rmver']]['description'])); } conf_mount_ro(); } @@ -231,7 +231,7 @@ include("head.inc");