Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Do you whitelist or blacklist utf-8?
- Date: Thu, 24 Feb 2011 11:02:18 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] Do you whitelist or blacklist utf-8?
- References: <4D639689.1010302@example.com> <4D63EFBC.1020900@example.com> <AANLkTik6yyhJ-gz+NJP2yU+08ipYLaZtwZ39pn9F_b97@example.com>
Josh Glover writes: > > IMHO, only whitelist. > > +1 What you mean is to blacklist possibly syntactic characters and only take characters off if you really need them. In particular, blacklist everything in ASCII except for the alphanumeric characters and maybe the space. But non-ASCII characters don't matter most of the time. "Whitelist everything in Unicode except for ASCII punctuation" isn't really a white list. > > Of course, all this is not excuse for not using pre-compiled SQL queries > > with placeholders, or whatever they are called in PHP. > > +2 Indeed, this is far more important. It's really not clear to me what Dave is worried about. XSS vulnerabilities are 100% about untrusted *ML (mostly HTML, but now many browsers can handle SVG and even generic XML). Filter "<" and you're done. No meta tags, no script tags, no a tags, no img tags, no link tags, have I missed any? doesn't matter, there are no tags at all here! More generically, the right thing to do is write down a grammar for valid input, and validate everything. Refuse to process or guess about invalid input (it's OK to guess, but the guess must be formally part of your grammar!) This is (in general) *more* than whitelisting characters, although for terms in a search box it might reduce to a whitelist of characters.
- Follow-Ups:
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Edmund Edgar
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Richard Frankum
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Josh Glover
- References:
- [tlug] Do you whitelist or blacklist utf-8?
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Shmuel Fomberg
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] cacert question
- Next by Date: Re: [tlug] Do you whitelist or blacklist utf-8?
- Previous by thread: Re: [tlug] Do you whitelist or blacklist utf-8?
- Next by thread: Re: [tlug] Do you whitelist or blacklist utf-8?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links