LWN.net Logo

Sanitizing log file output

Sanitizing log file output

Posted Jul 1, 2011 20:09 UTC (Fri) by dlang (✭ supporter ✭, #313)
In reply to: Sanitizing log file output by nix
Parent article: Sanitizing log file output

for what little it's worth, rsyslog does escape control characters by default.

this is a place that I think a bit of paranoia is good.

what does it hurt to change some characters to hex codes? the readability suffers a tiny bit, but this isn't a novel that you are reading, it's just a log message, and as long as the escaping is done consistantly, does it really matter if you see fooXbar (where X is something other than a ascii printable character) foo#xxxbar (or however you present the escaping)? in either case what you are really going to end up doing is searching or matching the string, and it really doesn't matter which you use for that purpose.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds