Commit graph

14340 commits

Author SHA1 Message Date
Barry Lind
8ba1fa7db1 Backport to 7.3. 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.

 Modified Files:
  Tag: REL7_3_STABLE
	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-08-07 17:56:27 +00:00
Tom Lane
1b637d7cbe 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.
2003-08-05 17:39:36 +00:00
Tom Lane
d1f35b73ac 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.
2003-08-04 17:58:25 +00:00
Tom Lane
5365a0cf52 Fix some more problems with testing error returns from SSL. 2003-08-04 17:25:29 +00:00
Tom Lane
a4ffca6bdf Fix longstanding error in _bt_search(): should moveright at top of loop not
bottom.  Otherwise we fail to moveright when the root page was split while
we were "in flight" to it.  This is not a significant problem when the root
is above the leaf level, but if the root was also a leaf (ie, a single-page
index just got split) we may return the wrong leaf page to the caller,
resulting in failure to find a key that is in fact present.  Bug has existed
at least since 7.1, probably forever.
2003-07-29 22:18:48 +00:00
Tom Lane
091b9c211c Fix timestamp_date for HAVE_INT64_TIMESTAMP case. 2003-07-24 04:38:27 +00:00
Bruce Momjian
5a8e537441 Add Hungarian/Turkish FAQ's to 7.3.4. 2003-07-24 00:53:57 +00:00
Bruce Momjian
0878a5e277 Add to 7.3.4 release notes:
* Repair breakage in timestamp-to-date conversion for dates before 2000
2003-07-24 00:44:24 +00:00
Tom Lane
fa67e2ce4f Repair 7.3 breakage in timestamp-to-date conversion for dates before 2000. 2003-07-24 00:21:31 +00:00
Barry Lind
83bc9b9d2e Patch to fix additional SQL injection vulnerabilities reported by Oliver Jowett
and Dmitry Tkach
 Modified Files:
  Tag: REL7_3_STABLE
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-23 23:34:31 +00:00
Bruce Momjian
97dcee285b New WAL fix release text is:
Prevent rare possibility of server startup failure (Tom)
2003-07-23 22:59:39 +00:00
Bruce Momjian
79b0da6e7c Update all FAQ's for 7.3.4. 2003-07-23 04:13:13 +00:00
Bruce Momjian
1ecc0fdb00 Stamp 7.3.4 release. 2003-07-23 04:10:16 +00:00
Tom Lane
3abd1390ba wups, took out one memset too many ... 2003-07-22 19:13:25 +00:00
Tom Lane
3196738793 Back-patch fix for bugs in pgstat_initstats. 2003-07-22 19:00:36 +00:00
Teodor Sigaev
fd9397c0e7 Allow sub[path|ltre] return void result 2003-07-22 14:08:58 +00:00
Teodor Sigaev
57970c37f8 Mark as deprecated 2003-07-22 14:04:50 +00:00
Barry Lind
5d882f78ae Fix to prevent SQL injection attacks when calling setObject(int,Object,int)
where the Object is a String and the type is numeric (i.e. INTEGER,LONG,etc).
The fix applies the standard escaping for these values.

 Modified Files:
  Tag: REL7_3_STABLE
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-22 05:13:05 +00:00
Tom Lane
004d2be5d9 Oh, for crying in a bucket ... relax Assert so that glibc's strxfrm
does not dump core.
2003-07-17 22:20:22 +00:00
Tom Lane
df32af15b6 Work around buggy strxfrm() present in some Solaris releases. 2003-07-17 20:52:42 +00:00
Tom Lane
19de9d2fee For COMMENT ON DATABASE where database name is unknown or not the current
database, emit a WARNING and do nothing, rather than raising ERROR.
Per recent discussion in which we concluded this is the best way to deal
with database dumps that are reloaded into a database of a new name.
2003-07-17 20:14:09 +00:00
Tom Lane
0a49e774b1 Repair boundary-case bug introduced by patch of two months ago that
fixed incorrect initial setting of StartUpID.  The logic in XLogWrite()
expects that Write->curridx is advanced to the next page as soon as
LogwrtResult points to the end of the current page, but StartupXLOG()
failed to make that happen when the old WAL ended exactly on a page
boundary.  Per trouble report from Hannu Krosing.
2003-07-17 16:45:25 +00:00
Tom Lane
537c1c1983 Fix a *second* buffer overrun bug in to_ascii(). Grumble. 2003-07-14 16:41:46 +00:00
Tom Lane
263b42f289 Don't generate 'zero' typeids in the output from gen_cross_product.
This is no longer necessary or appropriate since we don't use zero typeid
as a wildcard anymore, and it fixes a nasty performance problem with
functions with many parameters.  Per recent example from Reuven Lerner.
2003-06-25 20:07:54 +00:00
Bruce Momjian
612cbaf5ed [ Backpatch to 7.3.X.]
If they're not, the below causes problems, as the foreign key is added
after the CHECK.  Cluster depends on the index name, so I thought it
wise to ensure all names are available, rather than leaving off the
CONSTRAINT "$n" portion for internally named constraints.

CREATE TABLE jkey (col integer primary key);
CREATE TABLE j (col integer REFERENCES jkey);
ALTER TABLE j ADD CHECK(col > 5);


This is a problem in 7.3 series as well as -Tip.

--
Rod Taylor <rbt@rbt.ca>
2003-06-25 04:09:15 +00:00
Tom Lane
5fbc1d4a45 Fix bugs in interval-to-time conversion: HAVE_INT64_TIMESTAMP case did not
work at all, and neither case behaved sanely for negative intervals.
2003-06-16 18:56:53 +00:00
Tom Lane
1e2d20910b Fix SQL function executor for case where last command of a function is
not a SELECT.  We didn't use to allow that, but we do now.
2003-06-12 17:29:37 +00:00
Tom Lane
0a8fc25e42 Fix brain damage in deciding which python input converter to use. 2003-06-11 18:33:46 +00:00
Tom Lane
f9e42d2522 Add defense in assign_session_authorization() against trying to do
catalog lookups when not in a transaction.  This prevents bizarre
failures if someone tries to set a value for session_authorization in
postgresql.conf.  Per report from Fernando Nasser.
2003-06-06 16:25:52 +00:00
Tom Lane
5218f77c52 Fix misstatement in release-notes item. 2003-05-26 18:58:36 +00:00
Tom Lane
abb2963a4c Update for 7.3.3. 2003-05-22 20:38:56 +00:00
Tom Lane
9bc3438b03 Brand 7.3.3. 2003-05-22 20:17:24 +00:00
Tom Lane
2ff6e92f46 Update release history for impending 7.3.3 release. 2003-05-22 18:32:01 +00:00
Tom Lane
bab030b288 Repair sometimes-incorrect computation of StartUpID after a crash, per
example from Rao Kumar.  This is a very corner corner-case, requiring
a minimum of three closely-spaced database crashes and an unlucky
positioning of the second recovery's checkpoint record before you'd notice
any problem.  But the consequences are dire enough that it's a must-fix.
2003-05-22 14:39:49 +00:00
Tom Lane
3284e342a2 Back-patch Jan's fix to avoid primary key lookup (and lock) if foreign key
does not change on UPDATE.
2003-05-21 18:14:46 +00:00
Tom Lane
af1850fc1a Use -fPIC on Sparc, per Tom Callaway. 2003-05-19 17:51:08 +00:00
Tom Lane
529ec66d53 Back-patch change to avoid O(N^2) behavior with lots of deferred triggers,
by making deferredTriggerInvokeEvents only scan events added since it last ran.
2003-05-19 17:23:54 +00:00
Barry Lind
f3ed902421 Upped JDBC build number to 110 for the 7.3.3 release
Modified Files:
  Tag: REL7_3_STABLE
 	Driver.java.in
2003-05-19 04:12:52 +00:00
Tom Lane
8236cd7e74 Repair quoting sloppiness, lack of schema awareness in reindexdb. 2003-05-19 01:00:18 +00:00
Peter Eisentraut
977adedda8 Small translation updates for 7.3.3 release. 2003-05-18 23:51:41 +00:00
Tom Lane
1e3fbccd6c Fix failure when uniq-ifying an array of zero elements.
Teodor Sigaev
2003-05-16 18:50:00 +00:00
Tom Lane
bdec4179b7 Back-patch fix to allow createuser to exit on control-C (Oliver Elphick) 2003-05-16 15:17:02 +00:00
Tom Lane
583736fad4 Back-patch fix from Oliver Elphick to force ISO datestyle in dumps. 2003-05-16 13:57:03 +00:00
Tom Lane
3055ca0f6d Small changes to use the absolute path to system catalogs.
Greg Sabino Mullane
2003-05-16 13:37:11 +00:00
Tom Lane
ab90b49f6b Check calling context for connectby_text(), per Joe Conway. 2003-05-16 06:07:58 +00:00
Tom Lane
3ffaf20461 Apply fixes for problems with dropped columns whose types have also been
dropped.  Add regression test, too.
2003-05-12 00:17:34 +00:00
Tom Lane
016e059fcf Adjust CreateCheckpoint so that buffer dumping activities and cleanup of
dead xlog segments are not considered part of a critical section.  It is
not necessary to force a database-wide panic if we get a failure in these
operations.  Per recent trouble reports.
2003-05-10 18:01:49 +00:00
Bruce Momjian
f52c9c6fb6 Be more precise about check for flex 2.5.3, backpatched to 7.3.X. 2003-05-07 04:49:02 +00:00
Tom Lane
c04e80cf87 Allow 60 in seconds fields of timestamp, time, interval input values.
Per recent discussion on pgsql-general, this is appropriate for spec
compliance, and has the nice side-effect of easing porting from old
pg_dump files that exhibit the 59.999=>60.000 roundoff problem.
2003-05-04 04:30:35 +00:00
Tom Lane
f1b3af29c1 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our
implementation limits, do not issue an ERROR; instead issue a NOTICE and use
the max supported value.  Per pgsql-general discussion of 28-Apr, this is
needed to allow easy porting from pre-7.3 releases where the limits were
higher.

Unrelated change in same area: accept GLOBAL TEMP/TEMPORARY as a synonym
for TEMPORARY, as per pgsql-hackers discussion of 15-Apr.  We previously
rejected it, but that was based on a misreading of the spec --- SQL92's
GLOBAL temp tables are really closer to what we have than their LOCAL ones.
2003-05-04 00:04:10 +00:00