Re: TDBC documentation, examples, syntax?
- From: "tom.rmadilo" <tom.rmadilo@xxxxxxxxx>
- Date: Fri, 6 Mar 2009 22:43:55 -0800 (PST)
On Mar 5, 2:33 pm, Neil Madden <n...@xxxxxxxxxxxxx> wrote:
tom.rmadilo wrote:
[...]
SQL injection cannot be handled correctly beyond the first layer. The
only function of the first layer is to distinguish between code and
data.
Umm... what? Firstly, code *is* data. That is the entire problem. What
you mean is that the database interface needs to be able to distinguish
between data that is intended to be interpreted as an SQL query, and
that which is intended to be interpreted as e.g. an integer or string or
some other data type. The idea that this distinction can only be made
when data enters a system is utter nonsense, and indeed Tcl itself is a
quite handy proof by contradiction. Tcl delays interpreting values for
as long as possible, and yet still manages to distinguish different data
types just fine.
Interpretation of values is unimportant, separation of code and data
is essential, in fact that is all there is to it. When and/if you
combine data and code into a query, you might (depending on the
environment) need to "sanitize" the data, but all that means is you
use the query syntax to keep code and data separate once combined.
I guess what is surprising to me is that this is considered unique.
Handling Tcl code as "data" presents the same potential problem, just
as handling HTML inside a web form. In fact, just directly serving a
PDF file from your website can compromise your user's computer, and
maybe your website, assuming a third party malicious link. (http://
rmadilo.com/files/pdf-exploit/).
Anyway, I think I understand the issue, I understand that lots of
programmers don't understand the issue, but I don't understand why.
Maybe most programmers are more optimistic that I am. I assume
disaster and plan accordingly.
Also, I never even hinted that TDBC contained any exploits. My
assumption was that it was safe from SQL injection and any other
potential attack.
tom jackson
.
- Follow-Ups:
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- From: Uwe Klein
- Re: TDBC documentation, examples, syntax?
- References:
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: dkf
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- Prev by Date: Re: TDBC documentation, examples, syntax?
- Next by Date: Re: using wish to replace GDM/XDM in embedded control app'n
- Previous by thread: Re: TDBC documentation, examples, syntax?
- Next by thread: Re: TDBC documentation, examples, syntax?
- Index(es):
Relevant Pages
|