in reply to Safe::Logs - Feedback appreciated

It's good, but it isn't enough. You stated you've got a lot of perl that writes to logfiles. Is it the only thing writing to those log files, and /are you /really/ sure/? (Yes, that was double-italics.) You need to filter any potentialy untrusted data before it gets to your terminal. That could be as simple as using less out of "raw" mode (assuming it doesn't have bugs of it's own), or piping it through tr/\e/<esc>/;, etc, etc.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re: Re: Safe::Logs - Feedback appreciated
by fokat (Deacon) on Mar 03, 2003 at 18:30 UTC
    (...) but it isn't enough.

    We both agree here. Perl is not our only producer of log files. I am aware of the possible workarounds, that in my case also implies performing substitutions in the logs as they are compressed and rotated as well as education for the fellow sysadmins.

    I believe a complete answer to this problem requires a set of coordinated actions at different levels, that include fixing the terminal emulators themselves. However, it wouldn't be appropiate to bring such extraneous non-Perl thoughts to this sacred monastery ;-)

    Thanks (and ++) for your valuable opinion, which happened to remind me of a patch I need to produce :-)

    Best regards

    -lem, but some call me fokat