Bug#284897: [Pkg-nagios-devel] Bug#284897: nagios-pgsql: nagios eats single quotes in problem acknowledgement email messages

alet@unice.fr, 284897@bugs.debian.org alet@unice.fr, 284897@bugs.debian.org
Thu, 16 Dec 2004 10:27:30 +0100

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


On Thu, Dec 16, 2004 at 01:54:53AM -0500, sean finney wrote:
> take a look at what i found:
> /etc/nagios/nagios.cfg:illegal_macro_output_chars=3D`~$&|'"<>
> also, in the nagios source, it strips out any ascii characters greater
> than decimal 166:
>                         /* illegal ASCII characters */
>                         if(ch<32 || ch=3D=3D127)
>                                 continue;


>                         /* illegal extended ASCII characters */
>                         if(ch>=3D166)
>                                 continue;

this one sucks big time for non-english people !

what about using unicode strings ?

>                         /* illegal user-specified characters */
>                         illegal_char=3DFALSE;
>                         if(illegal_output_chars!=3DNULL){
>                                 for(z=3D0;illegal_output_chars[z]!=3D'\x0=
>                                         if(ch=3D=3D(int)illegal_output_ch=
>                                                 illegal_char=3DTRUE;
>                                                 break;
>                                                 }
>                                         }
>                                 }
> so this is in fact by design.  can you verify that changing
> the mentioned variable gets it to stop eating those special chars?

yes, now I've got the simple quote

but of course some accented letters still don't work
> if this does solve the initial problem i'll lower the severity of
> this to "wishlist" and forward a request upstream to the nagios folks
> asking to provide a way to allow the high ascii chars.


the problem is that the string is NOT the result of a command,
but a comment typed in by the particular nagios admin for the=20
service problem being acknowledged.

while I understand the security problem which may occur, I think
that access to nagios should be reserved to trusted people anyway,
so allowing them to type "unsafe" characters in their own
native language would be a great bonus...

also, for the single quote, it is also used in english, so it's
difficult to understand why it's stripped out of comments when
sending the notifications.

bye, and thanks for your time

Jerome Alet

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.2.5 (GNU/Linux)