pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Add test of various escape functions 6+ messages / 1 participants [nested] [flat]
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ac00ff1c96081ea4981f1001209b4719f5cd82ac Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/meson.build | 31 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/pgindent/typedefs.list | 3 + 8 files changed, 921 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/02d4d87ac20e2698b5375b347c451c55045e388d Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/meson.build | 31 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/pgindent/typedefs.list | 3 + 8 files changed, 921 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/01784793fca3d998dd36ea21f120a78f0b3d5e85 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/meson.build | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/meson.build | 31 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/msvc/Mkvcbuild.pm | 2 +- src/tools/pgindent/typedefs.list | 3 + 9 files changed, 922 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/de4b92f3332b7ea3373ae7bad0d790473b3665e6 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/msvc/Mkvcbuild.pm | 2 +- src/tools/pgindent/typedefs.list | 3 + 7 files changed, 890 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/46ddf98df0517d39108abdf5da29e0cae8d4ebfd Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/msvc/Mkvcbuild.pm | 3 +- src/tools/pgindent/typedefs.list | 3 + 7 files changed, 891 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Add test of various escape functions @ 2025-02-10 15:09 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2025-02-10 15:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an escape function leads to invalidly encoded output - Trailing incomplete multi-byte characters are handled sensibly - Escaped strings are parsed as single statement by psql's parser (which derives from the backend parser) There are further tests that would be good to add. But even in the current state it was rather useful for writing the fix in the prior commit. Reviewed-by: Noah Misch <noah@leadboat.com> Backpatch-through: 13 Security: CVE-2025-1094 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4ea3f5ef35f0d4aff89230eed63b76574b629f83 Modified Files -------------- src/test/modules/Makefile | 1 + src/test/modules/test_escape/.gitignore | 2 + src/test/modules/test_escape/Makefile | 27 + src/test/modules/test_escape/t/001_test_escape.pl | 53 ++ src/test/modules/test_escape/test_escape.c | 803 ++++++++++++++++++++++ src/tools/msvc/Mkvcbuild.pm | 3 +- src/tools/pgindent/typedefs.list | 3 + 7 files changed, 891 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-02-10 15:09 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de> 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de> 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de> 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de> 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de> 2025-02-10 15:09 pgsql: Add test of various escape functions Andres Freund <andres@anarazel.de>
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