Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Should dmesg(1) be patched to sanitize output for the current terminal/locale settings? (Is it already?)
What format is the raw kernel buffer, anyway? UTF-8?
Sanitizing log file output
Posted Jul 1, 2011 19:06 UTC (Fri) by nix (subscriber, #2304)
Posted Jul 1, 2011 20:09 UTC (Fri) by dlang (✭ supporter ✭, #313)
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.
Posted Jul 1, 2011 20:06 UTC (Fri) by jrn (subscriber, #64214)
Posted Jul 1, 2011 20:29 UTC (Fri) by nix (subscriber, #2304)
Posted Jul 3, 2011 0:21 UTC (Sun) by mgedmin (subscriber, #34497)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds