1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00
Commit Graph

3225 Commits

Author SHA1 Message Date
1ac3651be2 Reject certificates with embedded NULLs in the commonName field. This stops
attacks where an attacker would put <attack>\0<propername> in the field and
trick the validation code that the certificate was for <attack>.

This is a very low risk attack since it reuqires the attacker to trick the
CA into issuing a certificate with an incorrect field, and the common
PostgreSQL deployments are with private CAs, and not external ones. Also,
default mode in 8.4 does not do any name validation, and is thus also not
vulnerable - but the higher security modes are.

Backpatch all the way. Even though versions 8.3.x and before didn't have
certificate name validation support, they still exposed this field for
the user to perform the validation in the application code, and there
is no way to detect this problem through that API.

Security: CVE-2009-4034
2009-12-09 06:37:29 +00:00
2164a24686 Remove */ characters from declare cursor statements before putting them into a
comment.
2009-11-27 16:11:50 +00:00
1e925f49e7 Refactor ecpg grammar so that it uses the core grammar's unreserved_keyword
list, minus a few specific words that have to be treated specially.  This
replaces a hard-wired list of keywords that would have needed manual
maintenance, and was not getting it.  The 8.4 coding was already missing
these words, causing ecpg to incorrectly treat them as reserved words:
CALLED, CATALOG, DEFINER, ENUM, FOLLOWING, INVOKER, OPTIONS, PARTITION,
PRECEDING, RANGE, SECURITY, SERVER, UNBOUNDED, WRAPPER.  In HEAD we were
additionally missing COMMENTS, FUNCTIONS, SEQUENCES, TABLES.
Per gripe from Bosco Rama.
2009-11-21 05:44:12 +00:00
3385dcc8c8 Remove outside-the-scanner references to "yyleng".
It seems the flex developers have decided to change yyleng from int to size_t.
This has already happened in the latest release of OS X, and will start
happening elsewhere once the next release of flex appears.  Rather than trying
to divine how it's declared in any particular build, let's just remove the one
existing not-very-necessary external usage.

Back-patch to all supported branches; not so much because users in the field
are likely to care about building old branches with cutting-edge flex, as
to keep OSX-based buildfarm members from having problems with old branches.
2009-09-08 04:25:14 +00:00
6883b7df92 Tag 8.4.1 2009-09-04 00:36:51 +00:00
3e2440970a Translation updates 2009-09-03 21:01:26 +00:00
51ecc4b10e Fix mismatch in const:ness of parameters. 2009-07-22 11:07:04 +00:00
a6667d96c5 Translation updates for 8.4 release.
File that are translated less than 80% have been removed, as per new
translation team policy.
2009-06-26 19:33:52 +00:00
a93e7432cf Properly initialize SSL engines when used from libpq. This is required for
most external engines.

Per report and initial code from Lars Kanis
2009-06-23 18:13:23 +00:00
d747140279 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
2009-06-11 14:49:15 +00:00
0b7b908882 Translation updates 2009-06-10 23:42:44 +00:00
0465c52b00 Arrange that the string "syntax error" generated by bison is translated. 2009-06-10 23:11:52 +00:00
b5c838e170 Clean up ecpg's use of mmerror(): const-ify the format argument, add an
__attribute__() marker so that gcc can validate the format string against
the actual arguments, get rid of overcomplicated and unsafe usage in
base_yyerror().
2009-06-03 20:24:51 +00:00
e7f4923d3b Reverting patch just in case a compiler treats this enum as signed. 2009-05-27 14:16:51 +00:00
8af641ac1f Remove unused declarations of EncodeTimeOnly and DecodeTimeOnly. 2009-05-26 01:39:49 +00:00
ab9981ccc6 Removed comparison of unsigned expression < 0. 2009-05-21 12:54:27 +00:00
14f29f640a Removed unsigned/signed mismatches. 2009-05-20 16:49:23 +00:00
11a497f99a More variables gcc moans about 2009-05-20 16:39:56 +00:00
0754b391f3 Removed some unneeded variables and comparisons 2009-05-20 16:13:18 +00:00
2c39ab12f3 Make pwdfMatchesString() a little more careful about matching * fields. 2009-05-18 16:15:22 +00:00
f97017068f Translation updates 2009-05-14 21:41:53 +00:00
ab4e386a80 Fix ecpg tests for change that disallowed Unicode literals unless
standard_conforming_strings is on.
2009-05-06 03:22:15 +00:00
ac73ced725 Fix already-obsolete hint message ... sslverify parameter is no more. 2009-05-03 17:16:58 +00:00
e883d0b551 Remove sslverify parameter again, replacing it with two new sslmode values:
"verify-ca" and "verify-full".

Since "prefer" remains the default, this will make certificate validation
off by default, which should lead to less upgrade issues.
2009-04-24 09:43:10 +00:00
ce53791b2a Assorted portability fixes for Borland C, from Pavel Golub. 2009-04-19 22:37:13 +00:00
418fd59663 Add libpq error message text on how to handle missing root.crt file. 2009-04-14 17:30:16 +00:00
80a836cab4 Translation updates for 8.4 beta 2009-04-09 19:38:53 +00:00
1eef90d0a2 Rename the new CREATE DATABASE options to set collation and ctype into
LC_COLLATE and LC_CTYPE, per discussion on pgsql-hackers.
2009-04-06 08:42:53 +00:00
97503a5200 Add PQinitOpenSSL() function to support applications that use libcrypto
but not OpenSSL (or perhaps vice versa, if that's possible).

Andrew Chernow, with minor editorialization by me.
2009-03-31 01:41:27 +00:00
b86a71c8f4 Clarify variable naming: pq_initssllib -> pq_init_ssl_lib 2009-03-28 18:48:55 +00:00
3ab95c2ab0 Better document PQinitSSL(0) behavior in regards to libcrypto. 2009-03-28 01:36:11 +00:00
8032d76b5b Gettext plural support
In the backend, I changed only a handful of exemplary or important-looking
instances to make use of the plural support; there is probably more work
there.  For the rest of the source, this should cover all relevant cases.
2009-03-26 22:26:08 +00:00
727ffa1d1e Clean up pg_SSPI_error() coding a little bit: make the messages more
consistent, translate where intended, const-ify declarations.
Resolves a gripe from Alvaro as well as some stuff I didn't like.
2009-03-22 18:06:35 +00:00
0fd85d7879 Remove the datetime keywords ABSTIME and RELTIME, which we'd been treating as
noise words for the last twelve years, for compatibility with Berkeley-era
output formatting of the special INVALID values for those datatypes.
Considering that the datatypes themselves have been deprecated for awhile,
this is taking backwards compatibility a little far.  Per gripe from Josh
Berkus.
2009-03-22 01:12:32 +00:00
fb2ebae498 Add comments about kwlookup.c expectations 2009-03-08 16:53:30 +00:00
328d235571 Separate the key word list that lived in keywords.c into a new header file
kwlist.h, to avoid having to link the backend object file into other programs
like pg_dump.  We can now simply symlink a single source file from the backend
(kwlookup.c, containing the shared routine ScanKeywordLookup) and compile it
locally, which is a lot cleaner.
2009-03-07 00:13:58 +00:00
cd3b750929 Sort the output of --help mostly alphabetical, make it align better, make
help of pg_dump and pg_dumpall more similar.
2009-02-25 13:03:07 +00:00
e795b56322 ecpg requires libpq; add Makefile rules to require libpq to be built
first.

Alvaro Herrera
2009-02-07 17:17:34 +00:00
78cbd49826 Mixing long and int entries of a union only works on some architectures. 2009-02-05 08:28:47 +00:00
649a1252b7 Added result checks for calls to gmtime(). 2009-02-04 08:51:10 +00:00
08ffa78483 Argh, wrong line copied again. 2009-02-03 08:55:45 +00:00
efd019fc94 Fixed copy&paste mistake that made library use uninitialized variable. 2009-02-03 08:48:29 +00:00
80f95a6500 When changing a regression test file one should also change the expected output file. 2009-02-02 16:54:28 +00:00
934eab7cd5 Set memory segment to '0', just to be sure. 2009-02-02 16:49:50 +00:00
2d3c691146 Fixed auto allocation for binary data types. 2009-02-02 16:14:06 +00:00
77ca045384 Fixed bug in %s handling. 2009-02-02 15:35:28 +00:00
cb629f7225 Make messages consistent with existing ones 2009-01-30 12:53:43 +00:00
c05460fe50 Whitespace fix in message 2009-01-30 12:53:12 +00:00
7adbd76655 Message fix 2009-01-29 09:38:38 +00:00
16c46d5d7a Go over all OpenSSL return values and make sure we compare them
to the documented API value. The previous code got it right as
it's implemented, but accepted too much/too little compared to
the API documentation.

Per comment from Zdenek Kotala.
2009-01-28 15:06:47 +00:00