postgresql/src/backend
Peter Eisentraut 257eb57b50 Don't reflect unescaped cert data to the logs
Commit 3a0e385048 introduced a new path for unauthenticated bytes from
the client certificate to be printed unescaped to the logs. There are a
handful of these already, but it doesn't make sense to keep making the
problem worse. \x-escape any unprintable bytes.

The test case introduces a revoked UTF-8 certificate. This requires the
addition of the `-utf8` flag to `openssl req`. Since the existing
certificates all use an ASCII subset, this won't modify the existing
certificates' subjects if/when they get regenerated; this was verified
experimentally with

    $ make sslfiles-clean
    $ make sslfiles

Unfortunately the test can't be run in the CI yet due to a test timing
issue; see 55828a6b60.

Author: Jacob Champion <jchampion@timescale.com>
Discussion: https://www.postgresql.org/message-id/CAAWbhmgsvHrH9wLU2kYc3pOi1KSenHSLAHBbCVmmddW6-mc_=w@mail.gmail.com
2022-09-13 16:10:50 +02:00
..
access Remove useless pstrdups in untransformRelOptions 2022-09-13 11:59:31 +02:00
backup Remove obsolete comment 2022-08-26 10:44:50 +02:00
bootstrap Bump minimum version of Bison to 2.3 2022-09-09 12:31:41 +07:00
catalog Make eval statement naturally proof against perltidy 2022-09-12 11:59:43 +07:00
commands Make the tablesync worker's replication origin drop logic robust. 2022-09-12 12:40:57 +05:30
executor Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
foreign Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
jit Fix an assortment of improper usages of string functions 2022-09-06 13:19:44 +12:00
lib More -Wshadow=compatible-local warning fixes 2022-08-26 02:35:40 +12:00
libpq Don't reflect unescaped cert data to the logs 2022-09-13 16:10:50 +02:00
main Fix outdated --help message for postgres -f 2022-08-15 13:36:36 +09:00
nodes Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
optimizer Fix planner to consider matches to boolean columns in extension indexes. 2022-09-02 17:01:51 -04:00
parser Bump minimum version of Bison to 2.3 2022-09-09 12:31:41 +07:00
partitioning Fix planner to consider matches to boolean columns in extension indexes. 2022-09-02 17:01:51 -04:00
po NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00
port Cleanup more code and comments related to Windows NT4 (XP days) 2022-08-30 09:52:58 +09:00
postmaster pg_clean_ascii(): escape bytes rather than lose them 2022-09-13 16:10:44 +02:00
regex Defend against stack overrun in a few more places. 2022-08-24 13:02:19 -04:00
replication Make the tablesync worker's replication origin drop logic robust. 2022-09-12 12:40:57 +05:30
rewrite More -Wshadow=compatible-local warning fixes 2022-08-26 02:35:40 +12:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
storage Expand the use of get_dirent_type(), shaving a few calls to stat()/lstat() 2022-09-02 16:58:06 +09:00
tcop Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
tsearch Revert "Convert *GetDatum() and DatumGet*() macros to inline functions" 2022-09-12 19:57:07 +02:00
utils pg_clean_ascii(): escape bytes rather than lose them 2022-09-13 16:10:44 +02:00
.gitignore
Makefile Add jsonpath_gram.h to list of distprep targets 2022-09-09 11:46:19 +07:00
common.mk Remove SUBSYS.o rule in common.mk, hasn't been used in a long time 2022-08-24 20:38:14 -07:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00