Variables encoded twice

Bernd Arnold bernd_a at gmx.de
Sat Aug 9 16:15:03 CEST 2008


In statusmap.c, layout_method is an int and therefore shouldn't be escaped (the compiler put a message since int was passed as parameter where a char* is expected). File escape_string-2.diff, lines 271/273.

The HTML was broken when using apostrophs in the host name and/or the host alias (statusmap.cgi) and having escape_html_tags=0 in cgi.cfg. This is corrected in the patch. (escape_html_tags should only influence the plugin output.)

I've patched cmd.cgi to escape host, service and author names and the comment data. The call of url_encode is replaced by escape_string there. As a side effect, the author's name is displayed correctly now ("Nagios+Admin" before, "Nagios Admin" with the patch).

The file escape_string-3.diff includes Armin's patches (escape_string-2.diff) and my patches described above.

> cgiutils.h is generated from cgiutils.h.in by autoconf and is not in CVS.

Thanks. I've used the configure script to generate the cgiutils.h file after your patch.

Regards
Bernd

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: escape_string-3.diff
Type: application/octet-stream
Size: 34342 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080809/62afe14a/attachment.obj>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list