Re: [Nagios-devel] Nagios Core 3.5.0rc1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Nagios Core 3.5.0rc1

Post by Guest »

Thank, Phil. I found my logic error and corrected it.

On 3/8/13 2:49 PM, Randal, Phil wrote:
> Hi Eric,
>
> I’ve double checked my configs against the base 3.5.0rc1 cgi.cfg and nagios.cfg, nothing in them to cause a problem (except I made sure cgi.cfg had
>
> escape_html_tags=0
>
> What’s happening is that the double quote character in a href="www.dell.com ..." is being escaped into &#34
>
> Even if it was correct to escape it at that point, there's a bug (no semicolon at end of string, e.g. &h34;)
>
> Patch to fix that issue:
>
> diff -Naur cgiutils.c.old cgiutils.c
> --- cgiutils.c.old 2013-03-08 20:14:51.000000000 +0000
> +++ cgiutils.c 2013-03-08 20:16:17.000000000 +0000
> @@ -1055,7 +1055,7 @@
>
> /* for simplicity, all other chars represented by their numeric value */
> else {
> - sprintf( temp_expansion, "&#%u", *( unsigned int *)inwcp);
> + sprintf( temp_expansion, "&#%u;", *( unsigned int *)inwcp);
> if((( outstp - encoded_html_string) + strlen( temp_expansion)) output_max) {
> strncpy( outstp, temp_expansion, strlen( temp_expansion));
> @@ -1154,7 +1154,7 @@
>
> /* Encode everything else (this may be excessive) */
> else {
> - sprintf( temp_expansion, "&#%u", ( unsigned int)wctemp[ 0]);
> + sprintf( temp_expansion, "&#%u;", ( unsigned int)wctemp[ 0]);
> if((( stp - encoded_html_string) + strlen( temp_expansion)) output_max) {
> strncpy( stp, temp_expansion, strlen( temp_expansion));
>
>
> Even with that issue fixed firefox and IE mishandle urls of form
>
> href="http://www.dell.com/support/troubleshoo ... ag=xxxxxxx"
>
> It expects
>
> href="http://www.dell.com/support/troubleshoo ... ag=xxxxxxx"
>
> which is the original plugin output.
>
> status.cgi in 3.4.4 didn't escape the double quote character, which is the difference between the working 3.4.4 and broken 3.5.0rc1
>
> CentOS 5.9, Apache httpd-2.2.3-76.el5.centos
>
> Cheers,
>
> Phil
>
> From: Eric Stanley [mailto:[email protected]]
> Sent: 08 March 2013 17:27
> To: Nagios Developers List
> Subject: Re: [Nagios-devel] Nagios Core 3.5.0rc1
>
> Sorry, Phil, but I'm still not able to reproduce it. I tried using the check_esxi_hardware.py plugin and I get the following displayed in the 'Status Information' column on the status.cgi:
>
> OK - Server: Dell Inc. PowerEdge T710 s/n: xxxxxxxx System BIOS: 6.0.7 2011-08-18
>
> Can you send the applicable configs?
>
> Thanks,
>
> Eric
>
> On 3/7/13 6:48 AM, Randal, Phil wrote:
> ./check_openmanage -H hc-server -I
>
> OK - System: 'PowerEdge 1955', SN: 'xxxxxxx', 16 GB ram (8 dimms), 1 logical drives, 2 physical drives
>
> The href lines are what are getting mangled (appended in quotes) to the base cgi url
>
> Both 3.4.4 and 3.4.5rc1 work fine.
>
> It's my own rpm build, but that shouldn't make any difference.
>
> Cheers,
>
> Phil
> -----Original Message-----
> From: Eric Stanley [mailto:[email protected]]
> Sent: 07 March 2013 12:03
> To: [email protected]
> Subject: Re: [Nagios-devel] Nagios Core 3.5.0rc1
>
> Thanks for the report, Phil.
>
> I'm having a hard time guessing what might have broken that between
> 3.4.4 and now. I did a quick test using check_dummy and I don't see the issue.
>
> Are you running 3.4.4? If not, what version are you running where it works correctly

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked