diff --git a/notify_lists.php b/notify_lists.php
index 537563b..48291bf 100644
--- a/notify_lists.php
+++ b/notify_lists.php
@@ -590,7 +590,7 @@ function form_actions() {
-
+
$save_html
";
@@ -665,10 +665,10 @@ function form_actions() {
print "
|
-
+
-
+
$save_html
|
";
@@ -743,10 +743,10 @@ function form_actions() {
print "
|
-
+
-
+
$save_html
|
";
@@ -828,10 +828,10 @@ function form_actions() {
print "
|
-
+
-
+
$save_html
|
";
@@ -1138,7 +1138,7 @@ function hosts($header_label) {
@@ -1503,15 +1503,13 @@ function thold_device_template_edit() {
@@ -1564,14 +1562,14 @@ function thold_device_template_top() {
$('#cdialog').dialog();
});
- $('#continue').click(function(data) {
+ $('#continue').on('click', function(data) {
$.post('host_templates.php?action=item_remove_tt', {
__csrf_magic: csrfMagicToken,
- host_template_id: ,
- id:
+ host_template_id: ,
+ id:
}).done(function(data) {
$('#cdialog').dialog('close');
- loadPageNoHeader('host_templates.php?action=edit&header=false&id=');
+ loadPageNoHeader('host_templates.php?action=edit&header=false&id=');
});
});
diff --git a/tests/Integration/test_notify_list_wiring.php b/tests/Integration/test_notify_list_wiring.php
new file mode 100644
index 0000000..5d492fe
--- /dev/null
+++ b/tests/Integration/test_notify_list_wiring.php
@@ -0,0 +1,24 @@
+",
+ "'notify_lists.php?action=edit&id=' . (int)get_request_var('id')",
+ "",
+ "",
+);
+
+foreach ($checks as $needle) {
+ if (strpos($source, $needle) === false) {
+ fwrite(STDERR, "Missing expected notify list wiring\n");
+ exit(1);
+ }
+}
+
+echo "OK\n";
diff --git a/tests/Unit/test_notify_list_security_guards.php b/tests/Unit/test_notify_list_security_guards.php
new file mode 100644
index 0000000..1b7d86f
--- /dev/null
+++ b/tests/Unit/test_notify_list_security_guards.php
@@ -0,0 +1,26 @@
+",
+ "",
+ "td.name_cache RLIKE '\" . get_request_var('rfilter') . \"'",
+ "'td.data_template_id = ' . get_request_var('template')",
+ "' h.site_id=' . get_request_var('site_id')",
+ "'(td.notify_warning=' . get_request_var('id') . ' OR td.notify_alert=' . get_request_var('id') . ')'",
+);
+
+foreach ($legacy as $needle) {
+ if (strpos($source, $needle) !== false) {
+ fwrite(STDERR, "Found legacy insecure notify list pattern\n");
+ exit(1);
+ }
+}
+
+echo "OK\n";
diff --git a/thold.php b/thold.php
index a098e3c..1cae7ea 100644
--- a/thold.php
+++ b/thold.php
@@ -784,7 +784,7 @@ function clearFilter() {
}
$(function() {
- $('#thold').submit(function(event) {
+ $('#thold').on('submit', function(event) {
event.preventDefault();
applyFilter();
});
diff --git a/thold_graph.php b/thold_graph.php
index 97a61af..f2c2fd7 100644
--- a/thold_graph.php
+++ b/thold_graph.php
@@ -251,7 +251,7 @@ function form_thold_filter() {
- '>
+ '>