public inbox for [email protected]
help / color / mirror / Atom feedFrom: Noah Misch <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Separators in pg_hosts.conf fields
Date: Sun, 26 Apr 2026 14:32:52 -0700
Message-ID: <[email protected]> (raw)
If the build directory name contains a comma,
src/test/modules/ssl_passphrase_callback fails on master since commit 4f43302.
It fails because hba.c:next_token() treats a comma as a token separator:
* Tokens can be delimited by double quotes (this allows the inclusion of
* commas, blanks, and '#', but not newlines). As in SQL, write two
* double-quotes to represent a double quote.
Commit 4f43302 documented the pg_hosts.conf hostname field as a
comma-separated list, but not the other fields. Should other pg_hosts.conf
fields continue to require quoting around commas, or not?
commit 4649408 (HEAD, master)
Author: Noah Misch <[email protected]>
AuthorDate: Sun Apr 26 13:56:22 2026 -0700
Commit: Noah Misch <[email protected]>
CommitDate: Sun Apr 26 14:26:08 2026 -0700
Fix new test under comma in build directory.
Quote pg_hosts.conf fields derived from the build directory, since
hba.c:next_token() treats a comma as a token separator. Commit
4f433025f666fa4a6209f0e847715767fb1c7ace introduced pg_hosts.conf and
this test. A build directory name containing a comma worked before that
commit. A build directory name containing a quote character has not
worked, so don't handle that.
---
src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
index 09ff536..d8b07d4 100644
--- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
+++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
@@ -90,8 +90,8 @@ ssl_sni = on
});
$node->append_conf(
'pg_hosts.conf', qq{
-example.org $ddir/server.crt $ddir/server.key "" "echo FooBaR1" on
-example.com $ddir/server.crt $ddir/server.key "" "echo FooBaR1" on
+example.org "$ddir/server.crt" "$ddir/server.key" "" "echo FooBaR1" on
+example.com "$ddir/server.crt" "$ddir/server.key" "" "echo FooBaR1" on
});
# If the servers starts and runs, the bad ssl_passphrase.passphrase was
Attachments:
[text/plain] comma-test-sni-v1.patch (1.5K, 2-comma-test-sni-v1.patch)
download | inline diff:
commit 4649408 (HEAD, master)
Author: Noah Misch <[email protected]>
AuthorDate: Sun Apr 26 13:56:22 2026 -0700
Commit: Noah Misch <[email protected]>
CommitDate: Sun Apr 26 14:26:08 2026 -0700
Fix new test under comma in build directory.
Quote pg_hosts.conf fields derived from the build directory, since
hba.c:next_token() treats a comma as a token separator. Commit
4f433025f666fa4a6209f0e847715767fb1c7ace introduced pg_hosts.conf and
this test. A build directory name containing a comma worked before that
commit. A build directory name containing a quote character has not
worked, so don't handle that.
---
src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
index 09ff536..d8b07d4 100644
--- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
+++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
@@ -90,8 +90,8 @@ ssl_sni = on
});
$node->append_conf(
'pg_hosts.conf', qq{
-example.org $ddir/server.crt $ddir/server.key "" "echo FooBaR1" on
-example.com $ddir/server.crt $ddir/server.key "" "echo FooBaR1" on
+example.org "$ddir/server.crt" "$ddir/server.key" "" "echo FooBaR1" on
+example.com "$ddir/server.crt" "$ddir/server.key" "" "echo FooBaR1" on
});
# If the servers starts and runs, the bad ssl_passphrase.passphrase was
view thread (4+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Separators in pg_hosts.conf fields
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox