From: Dave Reisner <d@falconindy.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: util-linux@vger.kernel.org
Subject: Re: suggestion to avoid erroneous lines in findmnt/lslocks/...
Date: Sat, 4 Aug 2012 11:57:55 -0400 [thread overview]
Message-ID: <20120804155755.GJ529@rampage> (raw)
In-Reply-To: <501D42D2.6050904@draigBrady.com>
On Sat, Aug 04, 2012 at 04:42:10PM +0100, Pádraig Brady wrote:
> There was a recent change in df in coreutils to sanitize output of paths:
>
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=3ed70fd
>
> The essential issue fixed there is that control chars in a path will be
> converted to '?' (this works in all locales), and doing so will mean
> '\n' for example is not output. You could even consider this a potential
> security improvement so that arbitrary users couldn't influence the
> output of these commands for all users.
>
> I suggest using the simple inplace replacement function from above.
Why replace with a bogus character when you could instead use an octal
or hex escape? Wouldn't this still address the underlying problem?
Munging the content of a string could break a script consuming the
output with no way for the script to recover.
next prev parent reply other threads:[~2012-08-04 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-04 15:42 suggestion to avoid erroneous lines in findmnt/lslocks/ Pádraig Brady
2012-08-04 15:57 ` Dave Reisner [this message]
2012-08-05 2:02 ` Pádraig Brady
2012-08-06 8:15 ` Karel Zak
2012-08-06 11:10 ` Karel Zak
2012-08-06 14:44 ` Pádraig Brady
2012-08-07 8:09 ` Karel Zak
2012-08-07 11:35 ` Dave Reisner
2012-08-07 23:36 ` Pádraig Brady
2012-08-13 12:39 ` Karel Zak
2012-08-20 0:31 ` Pádraig Brady
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120804155755.GJ529@rampage \
--to=d@falconindy.com \
--cc=P@draigBrady.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox