Re: [Nagios-devel] URL Escaping in action_url -- Bug?

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] URL Escaping in action_url -- Bug?

Post by Guest »

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/03/09 07:31 PM, Don Tetreault wrote:
> Hi,
>
> We are in the process on upgrading fromNagios 2.8 to Nagios 3.0.6. Our
> original configuration includes serviceextinfo definitions which set the
> action_url to include a pair of macros as follows:
>
> define serviceextinfo{
> hostgroup_name meta-windows
> service_description disk usage on C:
> action_url
> /nagios_ext/cgi-bin/disk.cgi?h=$HOSTNAME$&s=$SERVICEDESC$
> }
>
> In version 2.8, the resulting HREF URL was properly escaped (with a plus
> sign replacing each space in the service description), but the spaces
> remain unchanged in version 3.0.6. A check of the apache access_log
> shows that Firefox replaces the space with %20 in the HTTP request, but
> I am concerned about unexpected behavior in our production environment.
>
> Is this a bug? Should I replace the macros with literal strings,
> properly escaped? Is there a better solution?
>
> Thank you in advance for any guidance.

Is that on the CGI page or when you use the url in commands, i.e. in
notification emails? AKAIK it shouldn't be a problem in a web page as
browsers properly encode URLs already. It can be a problem in text
emails where the email client is expected to detect and enable links.

I reported a problem in 3.0.1 - url was not escaped at all. Although it
should have been fixed in 3.0.2, I preferred to stick with 3.0.1
(actually a CVS version with many fixes) as the fix was possibly
affecting many other macro processing and I feared it could trigger more
bugs.

If you're having a problem using the url in commands, I would be very
interested to assist you (can be done in private).

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJwaqU6dZ+Kt5BchYRAqzpAKDOJkKyfhe3SMMDVJd/7NOSAi/BZwCg17Cd
Qp15RPknpPlpHoRmcPff1J4=
=SvBW
-----END PGP SIGNATURE-----





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