View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Nagios : Web Interface

Title:; & < > get removed in posted comments
FAQ ID:F0355
Submitted By:Andrew Holladay 
Last Updated:03/14/2007

Description:When comments are posted in nagios, the characters '; & < >' are removed in the posting. However, I'd like to include a complicated URL in the comments, something like 'http://localhost/monitor.faces?system=db&test=cdscheck&detail1=company&detail2=cds' or something else containing these restricted characters. How can I do this?  

Solution:These characters are excluded from CGI input for obvious security reasons. However, if your nagios installation is secure (inside a firewall for example) or you just don't care, you can change this behavior. In version 1.3, modify the sanitize_cgi_input function in getcgi.c to allow restricted characters. Then make devclean make all make install walla!  

Keywords:comments service comments host comments cgi input