aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHashjoin.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-02-10 10:03:40 -0500
committerAndres Freund <andres@anarazel.de>2025-02-10 10:03:40 -0500
commite0ef3d776a349db2c63075241626563b79477bd4 (patch)
treefb63f0ad11fecb83f69b0eb1c502110121f2870f /src/backend/executor/nodeHashjoin.c
parent2ae54ae17eaad592991e7459140b2cad2e82745c (diff)
downloadpostgresql-e0ef3d776a349db2c63075241626563b79477bd4.tar.gz
postgresql-e0ef3d776a349db2c63075241626563b79477bd4.zip
Fix handling of invalidly encoded data in escaping functions
Previously invalidly encoded input to various escaping functions could lead to the escaped string getting incorrectly parsed by psql. To be safe, escaping functions need to ensure that neither invalid nor incomplete multi-byte characters can be used to "escape" from being quoted. Functions which can report errors now return an error in more cases than before. Functions that cannot report errors now replace invalid input bytes with a byte sequence that cannot be used to escape the quotes and that is guaranteed to error out when a query is sent to the server. The following functions are fixed by this commit: - PQescapeLiteral() - PQescapeIdentifier() - PQescapeString() - PQescapeStringConn() - fmtId() - appendStringLiteral() Reported-by: Stephen Fewer <stephen_fewer@rapid7.com> Reviewed-by: Noah Misch <noah@leadboat.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Backpatch-through: 13 Security: CVE-2025-1094
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
0 files changed, 0 insertions, 0 deletions