libpq-oauth: Never link against libpq's encoding functions
Jacob Champion <jchampion@postgresql.org>
Author:
Jacob Champion <jchampion@postgresql.org>
Date: 2026-03-13T16:38:04Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/libpq-oauth/Makefile | modified | +9 −2 |
| src/interfaces/libpq-oauth/meson.build | modified | +9 −1 |
Discussion
- [oauth] Stabilize the libpq-oauth ABI (and allow alternative implementations?) 28 messages · 2025-12-09 → 2026-03-31