| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Noah Misch <noah(at)leadboat(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql(at)j-davis(dot)com |
| Subject: | Re: Decision by Monday: PQescapeString() vs. encoding violation |
| Date: | 2025-02-15 19:12:06 |
| Message-ID: | 164408.1739646726@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Noah Misch <noah(at)leadboat(dot)com> writes:
> On 2025-02-15 13:08:03 -0500, Tom Lane wrote:
>> The other thing that was discussed in the security thread was
>> modifying PQescapeStringInternal and PQescapeInternal to produce
>> no more than one complaint about invalid multibyte characters,
>> on the grounds that input that's just plain in some other encoding
>> would otherwise produce a ton of repetitive messages. That seems
>> trivial enough to mechanize with a bool already_complained flag,
>> so I think we should incorporate that refinement while we're here.
> +1
On closer inspection, PQescapeInternal already issues only one
error message, since it does "return NULL" after detecting the
first error. So this makes PQescapeStringInternal behave more
like that.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Make-escaping-functions-retain-trailing-bytes-of-.patch | text/x-diff | 10.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2025-02-15 20:09:48 | Re: Decision by Monday: PQescapeString() vs. encoding violation |
| Previous Message | Noah Misch | 2025-02-15 18:38:52 | Re: Decision by Monday: PQescapeString() vs. encoding violation |