pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacob Champion <jchampion@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: libpq-oauth: Never link against libpq's encoding functions
Date: Fri, 13 Mar 2026 16:38:51 +0000
Message-ID: <E1w15XH-003rMt-1b@gemulon.postgresql.org> (raw)

libpq-oauth: Never link against libpq's encoding functions

Now that libpq-oauth doesn't have to match the major version of libpq,
some things in pg_wchar.h are technically unsafe for us to use. (See
b6c7cfac8 for a fuller discussion.) This is unlikely to be a problem --
we only care about UTF-8 in the context of OAuth right now -- but if
anyone did introduce a way to hit it, it'd be extremely difficult to
debug or reproduce, and it'd be a potential security vulnerability to
boot.

Define USE_PRIVATE_ENCODING_FUNCS so that anyone who tries to add a
dependency on the exported APIs will simply fail to link the shared
module.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dba35604485feff679893f22a79e8c0f3ee6fc0e

Modified Files
--------------
src/interfaces/libpq-oauth/Makefile    | 11 +++++++++--
src/interfaces/libpq-oauth/meson.build | 10 +++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)



Message-ID: <E1w15XH-003rMt-1b@gemulon.postgresql.org>
Permalink:  ../E1w15XH-003rMt-1b@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w15XH-003rMt-1b@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jchampion@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: libpq-oauth: Never link against libpq's encoding functions
  In-Reply-To: <E1w15XH-003rMt-1b@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox