From: Sehrope Sarkuni <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] 739e59: Merge pull request from GHSA-r38f-c4h4-hqq2
Date: Mon, 01 Aug 2022 09:46:39 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/736f95-739e59@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 739e599d52ad80f8dcd6efedc6157859b1a9d637
https://github.com/pgjdbc/pgjdbc/commit/739e599d52ad80f8dcd6efedc6157859b1a9d637
Author: Sehrope Sarkuni <sehrope@jackdb.com>
Date: 2022-08-01 (Mon, 01 Aug 2022)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc2/ResultSetRefreshTest.java
Log Message:
-----------
Merge pull request from GHSA-r38f-c4h4-hqq2
Fixes SQL generated in PgResultSet.refresh() to escape column identifiers so as to prevent SQL injection.
Previously, the column names for both key and data columns in the table were copied as-is into the generated
SQL. This allowed a malicious table with column names that include statement terminator to be parsed and
executed as multiple separate commands.
Also adds a new test class ResultSetRefreshTest to verify this change.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] 739e59: Merge pull request from GHSA-r38f-c4h4-hqq2
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/736f95-739e59@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/736f95-739e59@github.com>
* 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