Re: Escape handling in strings - Mailing list pgsql-patches

From Tom Lane
Subject Re: Escape handling in strings
Date
Msg-id 14648.1118926504@sss.pgh.pa.us
Whole thread Raw
In response to Re: Escape handling in strings  (Rod Taylor <pg@rbt.ca>)
Responses Re: Escape handling in strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Rod Taylor <pg@rbt.ca> writes:
> It probably won't be any worse than when '' was rejected for an integer
> 0.

That analogy is *SO* far off the mark that I have to object.

Fooling with quoting rules will not simply cause clean failures, which
is what you got from ''-no-longer-accepted-by-atoi.  What it will cause
is formerly valid input being silently interpreted as something else.
That's bad enough, but it gets worse: formerly secure client code may
now be vulnerable to SQL-injection attacks, because it doesn't know how
to quote text properly.

What we are talking about here is an extremely significant change with
extremely serious consequences, and imagining that it is not will be
a recipe for disaster.

I also think that pgsql-patches is not the place to be discussing such
things... it needs a whole lot more visibility.

            regards, tom lane

pgsql-patches by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Escape handling in strings
Next
From: Tom Lane
Date:
Subject: Re: Escape handling in strings