make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quoting special characters (was: Re: Possible solution for special c


From: David A. Wheeler
Subject: Re: Quoting special characters (was: Re: Possible solution for special characters in makefile paths)
Date: Mon, 24 Feb 2014 17:19:38 -0500 (EST)

> > > Assume there are two files, "foo bar" and "ba\z qu'x". What
> > > does/should happen here?
> >
> > $wildcard could return «foo\ bar ba\\z\ qu\'x» (without the outer
> > quotes) or some such.

Another approach is for it to return
«foo barTABba\z qu'x» where TAB is the \t character.
The TAB character is also permitted in most Unix-like filesystems,
but practically no one except attackers actually USES this functionality.
This approach is not tied to any particular shell scripting syntax, and
it means that the individual filenames are pristine.

(It's possible to also use NEWLINE, but since shells and many other
languages start new commands on newline, that's probably even less convenient.)

--- David A. Wheeler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]