Barry Lind [Thu, 7 Aug 2003 04:03:13 +0000 (04:03 +0000)]
Sometimes the third time is the charm. Third try to fix the sql injection
vulnerability. This fix completely removes the ability (hack) of being able
to bind a list of values in an in clause. It was demonstrated that by allowing
that functionality you open up the possibility for certain types of
sql injection attacks. The previous fix attempts all focused on preventing
the insertion of additional sql statements (the semi-colon problem:
xxx; any new sql statement here). But that still left the ability to
change the where clause on the current statement or perform a subselect
which can circumvent applicaiton security logic and/or allow you to call
any stored function.
Barry Lind [Wed, 6 Aug 2003 23:50:19 +0000 (23:50 +0000)]
Applied doc patch for the jdbc docs submitted by Nic Ferrier for functionality
he supplied a few months ago, but didn't get around to docing until now. And
he also added some doc for calling stored functions in general from jdbc that was missing.
Tom Lane [Wed, 6 Aug 2003 15:54:06 +0000 (15:54 +0000)]
Fix compiler-detected problem for Alphas: it seems strlen returns
something wider than int on that platform. Also, remove bogus
assumption that sizeof("INT_MAX") has something to do with the maximum
number of digits in an int.
Tom Lane [Tue, 5 Aug 2003 18:30:21 +0000 (18:30 +0000)]
Improve documentation of ParseDateTime(). Reorder tests to prevent
writing one more value into return arrays than will fit. This is
potentially a stack smash, though I do not think it is a problem in
current uses of the routine, since a failure return causes elog anyway.
Tom Lane [Tue, 5 Aug 2003 17:39:19 +0000 (17:39 +0000)]
Fix several places where fractional-second inputs were misprocessed
in HAVE_INT64_TIMESTAMP cases, including two potential stack smashes
when more than six fractional digits were supplied. Per bug report
from Philipp Reisner.
Tom Lane [Mon, 4 Aug 2003 17:58:14 +0000 (17:58 +0000)]
SSL_read/SSL_write do not approximate the return conventions of recv()
and send() very well at all; and in any case we can't use retval==0
for EOF due to race conditions. Make the same fixes in the backend as
are required in libpq.
Tom Lane [Sun, 3 Aug 2003 23:46:37 +0000 (23:46 +0000)]
Tighten inline_function's test for overly complex parameters. This
should catch most situations where repeated inlining blows up the
expression complexity unreasonably, as in Joe Conway's recent example.
Bruce Momjian [Fri, 1 Aug 2003 22:18:15 +0000 (22:18 +0000)]
Update, add Greg:
< * Fernando Nasser <fnasser@redhat.com> of Red Hat
< * Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
> * Fernando is Fernando Nasser <fnasser@redhat.com> of Red Hat
> * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
> * Greg is Greg Sabino Mullane <greg@turnstep.com>
Tom Lane [Fri, 1 Aug 2003 21:27:27 +0000 (21:27 +0000)]
Code review for sslmode patch: eliminate memory leak, avoid giving a
completely useless error message in 'allow' case, don't retry connection
at the sendauth stage (by then the server will either let us in or not,
no point in wasting cycles on another try in the other SSL state).
Tom Lane [Fri, 1 Aug 2003 19:12:52 +0000 (19:12 +0000)]
Since HPUX now exists for Itanium, we should decouple the assumption
that OS=hpux is the same as CPU=hppa. First steps at doing this.
With these patches, we still work on hppa with either gcc or HP's cc.
We might work on hpux/itanium with gcc, but I can't test it. Definitely
will not work on hpux/itanium with non-gcc compiler, for lack of spinlock
code.
Tom Lane [Thu, 31 Jul 2003 19:20:41 +0000 (19:20 +0000)]
When using a temp installation, unset PGUSER and other variables we
might have inherited from the environment that would possibly cause
psql to fail to connect to the temp installation properly. Per trouble
report from Markus Bertheau 7/1/03.
Tom Lane [Thu, 31 Jul 2003 18:36:46 +0000 (18:36 +0000)]
Cause library-preload feature to report error if specified initialization
function is not found. Also, make all the PL libraries have initialization
functions with standard names. Patch from Joe Conway.
Tom Lane [Thu, 31 Jul 2003 17:21:57 +0000 (17:21 +0000)]
Upgrade parsing code for ACLs to be less hokey and more cognizant of
the actual logical structure and quoting rules being used. Fixes bug
reported by Chris K-L on 7/8/03.