[patch] fix for conversion of \n to <BR> (in CGIs)
Posted: Tue Oct 21, 2014 5:28 am
Dear All,
I've found out that CGIs in nagios 3.2.2 (e.g. in extinfo.cgi, in long plugin output) converts successfully \n (written as two characters) to <BR>, while in nagios 4.0.20130912, the conversion is broken.
One reason of the problem is: 'n' in the source code of cgiutils.c in 3.2.2 has been replaced with '\n' in 4.0.20130912 what is obviously not the same.
Also two other related corrections were needed (as new functionality has been added and was affected too).
The fix is in attachment. I hope it will help someone.
Best regards,
Marek Kaminski [ marek.kaminski.1112 (at) gmail.com ]
I've found out that CGIs in nagios 3.2.2 (e.g. in extinfo.cgi, in long plugin output) converts successfully \n (written as two characters) to <BR>, while in nagios 4.0.20130912, the conversion is broken.
One reason of the problem is: 'n' in the source code of cgiutils.c in 3.2.2 has been replaced with '\n' in 4.0.20130912 what is obviously not the same.
Also two other related corrections were needed (as new functionality has been added and was affected too).
The fix is in attachment. I hope it will help someone.
Best regards,
Marek Kaminski [ marek.kaminski.1112 (at) gmail.com ]