[icinga-checkins] icinga.org: icinga-core/rbartels/cgi: classic-ui: added url_encode for ' executed command' in extinfo.cgi #3901

git at icinga.org git at icinga.org
Sun Apr 7 23:17:46 CEST 2013


Module: icinga-core
Branch: rbartels/cgi
Commit: e72c8b36fc7b313a7861ba1e039bbcbdff386a10
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=e72c8b36fc7b313a7861ba1e039bbcbdff386a10

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Sun Apr  7 23:08:40 2013 +0200

classic-ui: added url_encode for 'executed command' in extinfo.cgi #3901

refs: #3901

---

 cgi/extinfo.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/cgi/extinfo.c b/cgi/extinfo.c
index 3a51857..cb509d9 100644
--- a/cgi/extinfo.c
+++ b/cgi/extinfo.c
@@ -1550,7 +1550,7 @@ void show_host_info(void) {
 			printf("<TR><TD CLASS='dataVar'>Last Check Time:</td><td CLASS='dataVal'>%s</td></tr>\n", date_time);
 
 			if (temp_hoststatus->checks_enabled == TRUE)
-				printf("<TR><TD CLASS='dataVar'>Check Type:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&expand=%s'>ACTIVE</A></TD></TR>\n", CONFIG_CGI, host_name, url_encode(temp_host->host_check_command));
+				printf("<TR><TD CLASS='dataVar'>Check Type:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&expand=%s'>ACTIVE</A></TD></TR>\n", CONFIG_CGI, url_encode(host_name), url_encode(temp_host->host_check_command));
 			else if (temp_hoststatus->accept_passive_host_checks == TRUE)
 				printf("<TR><TD CLASS='dataVar'>Check Type:</TD><TD CLASS='dataVal'>PASSIVE</TD></TR>\n");
 			else
@@ -1590,8 +1590,7 @@ void show_host_info(void) {
 			print_modified_attributes(HTML_CONTENT, EXTINFO_CGI, temp_hoststatus->modified_attributes);
 			printf("</td></tr>\n");
 
-			printf("<TR><TD CLASS='dataVar'>Executed Command:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&expand=%s'>Command Expander</A></TD></TR>\n", CONFIG_CGI, host_name, url_encode(temp_host->host_check_command));
-
+			printf("<TR><TD CLASS='dataVar'>Executed Command:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&expand=%s'>Command Expander</A></TD></TR>\n", CONFIG_CGI, url_encode(host_name), url_encode(temp_host->host_check_command));
 
 			printf("</TABLE>\n");
 			printf("</TD></TR>\n");
@@ -1987,7 +1986,7 @@ void show_service_info(void) {
 
 			if (temp_svcstatus->checks_enabled == TRUE)
 				printf("<TR><TD CLASS='dataVar'>Check Type:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&service=%s&expand=%s'>ACTIVE</A></TD></TR>\n",
-				       CONFIG_CGI, host_name, service_desc, url_encode(temp_service->service_check_command));
+				       CONFIG_CGI, url_encode(host_name), url_encode(service_desc), url_encode(temp_service->service_check_command));
 			else if (temp_svcstatus->accept_passive_service_checks == TRUE)
 				printf("<TR><TD CLASS='dataVar'>Check Type:</TD><TD CLASS='dataVal'>PASSIVE</TD></TR>\n");
 			else
@@ -2027,7 +2026,7 @@ void show_service_info(void) {
 			print_modified_attributes(HTML_CONTENT, EXTINFO_CGI, temp_svcstatus->modified_attributes);
 			printf("</td></tr>\n");
 
-			printf("<TR><TD CLASS='dataVar'>Executed Command:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&service=%s&expand=%s'>Command Expander</A></TD></TR>\n", CONFIG_CGI, host_name, service_desc, url_encode(temp_service->service_check_command));
+			printf("<TR><TD CLASS='dataVar'>Executed Command:</TD><TD CLASS='dataVal'><A HREF='%s?type=command&host=%s&service=%s&expand=%s'>Command Expander</A></TD></TR>\n", CONFIG_CGI, url_encode(host_name), url_encode(service_desc), url_encode(temp_service->service_check_command));
 
 			printf("</TABLE>\n");
 			printf("</TD></TR>\n");





More information about the icinga-checkins mailing list