Project

General

Profile

« Previous | Next » 

Revision 08c1db2d

Added by Jim Pingle over 10 years ago

Fix encoding issues in Configuration History list.

View differences:

usr/local/www/diag_confbak.php
61 61
	$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
62 62
	if($_POST['newver'] != "") {
63 63
		if(config_restore($g['conf_path'] . '/backup/config-' . $_POST['newver'] . '.xml') == 0)
64
		$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']);
64
		$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']));
65 65
		else
66 66
			$savemsg = gettext("Unable to revert to the selected configuration.");
67 67
	}
68 68
	if($_POST['rmver'] != "") {
69 69
		unlink_if_exists($g['conf_path'] . '/backup/config-' . $_POST['rmver'] . '.xml');
70
		$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']);
70
		$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']));
71 71
	}
72 72
	conf_mount_ro();
73 73
}
......
231 231
							<td class="listlr"> <?= date(gettext("n/j/y H:i:s"), $config['revision']['time']) ?></td>
232 232
							<td class="listr"> <?= $config['version'] ?></td>
233 233
							<td class="listr"> <?= format_bytes(filesize("/conf/config.xml")) ?></td>
234
							<td class="listr"> <?= $config['revision']['description'] ?></td>
234
							<td class="listr"> <?= htmlspecialchars($config['revision']['description']) ?></td>
235 235
							<td valign="middle" class="list nowrap"><b><?=gettext("Current");?></b></td>
236 236
						</tr>
237 237
						<?php
......
257 257
							<td class="listlr"> <?= $date ?></td>
258 258
							<td class="listr"> <?= $version['version'] ?></td>
259 259
							<td class="listr"> <?= format_bytes($version['filesize']) ?></td>
260
							<td class="listr"> <?= $version['description'] ?></td>
260
							<td class="listr"> <?= htmlspecialchars($version['description']) ?></td>
261 261
							<td valign="middle" class="list nowrap">
262 262
							<a href="diag_confbak.php?newver=<?=$version['time'];?>">
263 263
							<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="<?=gettext("Revert to this configuration");?>" title="<?=gettext("Revert to this configuration");?>" />

Also available in: Unified diff