Re: [Nagios-devel] Bug and (loosely related) patch: Nagios 3.2.1

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] Bug and (loosely related) patch: Nagios 3.2.1

Post by Guest »

This is a multi-part message in MIME format.
--------------020801020804010803060501
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 08/29/2010 06:24 PM, Jochen Bern wrote:
> Sorry for the extra work, but there'll be at least one more update - I
> used strtok() where I *should* have used my_strsep() from the cgiutils

Next attempt ...

-- Replaced the offending strtok() with some local code ...
-- ... which also handles the backslash escapes of Nagios 3.x.
-- Tells "(undefined)" and "(empty)" $ARGn$s apart.
-- Warns of $ARGn$s with leading or trailing whitespace ...
-- ... and additionally puts them into "‍...‍" to make
sure that there'll be *something* displayed with the $ARGn$'s color
(see the "unused: $ARG5$=3D" line in the screenshot for an example).
-- Changed a boatload of "printf(...,some_string);" to
"printf(...,html_encode(some_string,FALSE));".

The whitespace detection is still not quite finished because I hit a
snag in the existing code, namely, in cgi/cgiutils.c::url_encode() :

> /* spaces are pluses */
> else if((char)input[x] str[y]=3D'+';
> y++;
> }
>=20
> /* anything else gets represented by its hex value */
> else{

Note the "
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel

--------------020801020804010803060501
Content-Type: image/png;
name="CommandExpansion4.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="CommandExpansion4.png"

iVBORw0KGgoAAAANSUhEUgAAA7UAAAFyCAIAAAClSWpHAAAACXBIWXMAAA8SAAAPEgEhm/Iz
AAAgAElEQV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ios6ePZucnCyx7uPHj83MzCoqKkhbkyxSUVGpqKh4+vSp
qalpWlpax44d4dPHHx89etTT0xMArly5MmDAAPoqZMtPnjwxMzNT

...[email truncated]...


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