[icinga-checkins] icinga.org: icinga-core/test/cgis: fixed: ssi files don' t get included if icinga path contains uppercase letters #1716

git at icinga.org git at icinga.org
Thu Jul 28 01:37:13 CEST 2011


Module: icinga-core
Branch: test/cgis
Commit: 7a442abceb02f967d572f9a9b85540bb0f55cd81
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=7a442abceb02f967d572f9a9b85540bb0f55cd81

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Thu Jul 28 01:20:27 2011 +0200

fixed: ssi files don't get included if icinga path contains uppercase letters #1716

It doesn't make sense to convert the whole path of ssi file to lower case.
2 lines in include_ssi_files removed.

---

 Changelog      |    1 +
 cgi/cgiutils.c |    8 ++------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Changelog b/Changelog
index d721f94..808ba2a 100644
--- a/Changelog
+++ b/Changelog
@@ -58,6 +58,7 @@ FIXES
 * classic ui: fixed: submitting non existent host/service on avail.cgi causes segfault. (M. Luebben) #1700
 * classic ui: fixed: Alert History State filter for HARD/SOFT state not working (Lennart Betz) #1722
 * classic ui: fixed: jquery 1.5.2 triggers memory leak in IE #1740
+* classic ui: fixed: ssi files don't get included if icinga path contains uppercase letters #1716
 
 * install: fix event handlers cmd file location in contrib #1501
 * install: fix make install-idoutils overwrites sample - adding idoutils.cfg-sample instead #1625
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 38746fa..6b850bc 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -1961,7 +1961,6 @@ void include_ssi_files(char *cgi_name, int type){
 	char cgi_ssi_file[MAX_INPUT_BUFFER];
 	char raw_cgi_name[MAX_INPUT_BUFFER];
 	char *stripped_cgi_name;
-	int x;
 
 	/* common header or footer */
 	snprintf(common_ssi_file,sizeof(common_ssi_file)-1,"%scommon-%s.ssi",physical_ssi_path,(type==SSI_HEADER)?"header":"footer");
@@ -1973,19 +1972,16 @@ void include_ssi_files(char *cgi_name, int type){
 	stripped_cgi_name=strtok(raw_cgi_name,".");
 	snprintf(cgi_ssi_file,sizeof(cgi_ssi_file)-1,"%s%s-%s.ssi",physical_ssi_path,(stripped_cgi_name==NULL)?"":stripped_cgi_name,(type==SSI_HEADER)?"header":"footer");
 	cgi_ssi_file[sizeof(cgi_ssi_file)-1]='\x0';
-	for(x=0;x<strlen(cgi_ssi_file);x++)
-		cgi_ssi_file[x]=tolower(cgi_ssi_file[x]);
 
 	if(type==SSI_HEADER){
 		printf("\n<!-- Produced by %s (http://www.%s.org).\nCopyright (c) 1999-2009 Ethan Galstad (egalstad at nagios.org)\nCopyright (c) 2009-2011 Icinga Development Team -->\n", PROGRAM_NAME, PROGRAM_NAME_LC);
 		include_ssi_file(common_ssi_file);
 		include_ssi_file(cgi_ssi_file);
-	        }
-	else{
+	}else{
 		include_ssi_file(cgi_ssi_file);
 		include_ssi_file(common_ssi_file);
 		printf("\n<!-- Produced by %s (http://www.%s.org).\nCopyright (c) 1999-2009 Ethan Galstad (egalstad at nagios.org)\nCopyright (c) 2009-2011 Icinga Development Team -->\n", PROGRAM_NAME, PROGRAM_NAME_LC);
-	        }
+	}
 
 	return;
 }





More information about the icinga-checkins mailing list