Projet

Général

Profil

« Précédent | Suivant » 

Révision bb55330a

Ajouté par Ermal il y a plus de 9 ans

Do not let the user mess with SAs from this page. The daemon and primary status page handles tat

Voir les différences:

usr/local/www/diag_ipsec_sad.php
52 52

  
53 53
$sad = ipsec_dump_sad();
54 54

  
55
/* delete any SA? */
56
if ($_GET['act'] == "del") {
57
	$fd = @popen("/sbin/setkey -c > /dev/null 2>&1", "w");
58
	if ($fd) {
59
		fwrite($fd, "delete {$_GET['src']} {$_GET['dst']} {$_GET['proto']} {$_GET['spi']} ;\n");
60
		pclose($fd);
61
		sleep(1);
62
	}
63
}
64

  
65 55
?>
66 56

  
67 57
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
......
105 95
							<td class="listr"><?=htmlspecialchars($sa['aalgo']);?></td>
106 96
							<td class="listr"><?=htmlspecialchars($sa['data']);?></td>
107 97
							<td class="list nowrap">
108
								<?php
109
									$args = "src=" . rawurlencode($sa['src']);
110
									$args .= "&amp;dst=" . rawurlencode($sa['dst']);
111
									$args .= "&amp;proto=" . rawurlencode($sa['proto']);
112
									$args .= "&amp;spi=" . rawurlencode("0x" . $sa['spi']);
113
								?>
114
								<a href="diag_ipsec_sad.php?act=del&amp;<?=$args;?>" onclick="return confirm('<?=gettext("Do you really want to delete this security association?"); ?>')">
115
									<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
116
								</a>
117 98
							</td>
118 99
						</tr>
119 100
						<?php endforeach; ?>

Formats disponibles : Unified diff