Subject: | unarm dangerous characters |
I am trying to make Sys::Syslog safer. It has two problems: 1) logged
strings are passed-on to the kernel in "perl internal format" 2)
dangerous characters are not escaped.
The first part is easy to solve: just use encode(). The second, however,
calls for a module which translates \0x1b into <esc> or \b. Whatever
syslog receives is written to logfiles. When root opens these logfiles,
the escape codes will get executed. So we have to block escape-codes
client-side.
So: we need a very simple "encode"-like module to do the job,
preferrably written in C. For me, it seems a good plan to have it
included in your distribution. But you may have an other solution?
Sincerely,
MarkOv