1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
$NetBSD: patch-ao,v 1.1 2008/03/18 21:53:41 tonnerre Exp $
--- cgi/status.c.orig 2006-04-26 17:33:59.000000000 +0200
+++ cgi/status.c
@@ -572,6 +572,7 @@ int process_cgivars(void){
show_all_hostgroups=TRUE;
else
show_all_hostgroups=FALSE;
+ strip_html_brackets(hostgroup_name);
}
/* we found the servicegroup argument */
@@ -589,6 +590,7 @@ int process_cgivars(void){
show_all_servicegroups=TRUE;
else
show_all_servicegroups=FALSE;
+ strip_html_brackets(servicegroup_name);
}
/* we found the host argument */
@@ -606,6 +608,7 @@ int process_cgivars(void){
show_all_hosts=TRUE;
else
show_all_hosts=FALSE;
+ strip_html_brackets(host_name);
}
/* we found the columns argument */
@@ -725,6 +728,7 @@ int process_cgivars(void){
break;
}
service_filter=strdup(variables[x]);
+ strip_html_brackets(service_filter);
}
}
@@ -1720,7 +1724,7 @@ void show_service_detail(void){
printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,date_time);
printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,state_duration);
printf("<TD CLASS='status%s'>%d/%d</TD>\n",status_bg_class,temp_status->current_attempt,temp_status->max_attempts);
- printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":temp_status->plugin_output);
+ printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":html_encode(temp_status->plugin_output));
printf("</TR>\n");
@@ -2102,7 +2106,7 @@ void show_host_detail(void){
printf("<TD CLASS='status%s'>%s</TD>\n",status_class,status);
printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,date_time);
printf("<TD CLASS='status%s' nowrap>%s</TD>\n",status_bg_class,state_duration);
- printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":temp_status->plugin_output);
+ printf("<TD CLASS='status%s'>%s </TD>\n",status_bg_class,(temp_status->plugin_output==NULL)?"":html_encode(temp_status->plugin_output));
printf("</TR>\n");
}
|