Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
classic-ui: added url_encode for 'executed command' in extinfo.cgi #3901
Browse files Browse the repository at this point in the history
refs: #3901
  • Loading branch information
bb-Ricardo committed Apr 7, 2013
1 parent 49e790a commit e72c8b3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cgi/extinfo.c
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit e72c8b3

Please sign in to comment.