Subject: Re: useradd: spaces and $ in usernames
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 11/19/2001 20:54:42
>>> +	/* This should cover most shells :-( */
>>> +	static char meta[] = "\n \t'`\";&<>()|*?{}[]\\$!#^~";
>> Wouldn't it be better to decide that certain characters are safe,
>> and then escape everything else?

>> Consider  or  or , which could reasonably be metacharacters...
> In what shell?

Any that supports <<, >>, and |, and wants to do Latin-1.  In
French-speaking regions,  and  are more likely to be quoting
metacharacters than redirection metacharacters, but still

Not that it really matters much - the point of "ensure that anything
not specifically thought about is unsafe" is as valid - or invalid - as
ever regardless of the details of the example.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B