Re: lower() and unaccent() not leakproof - Mailing list pgsql-general

From Tom Lane
Subject Re: lower() and unaccent() not leakproof
Date
Msg-id 648381.1629986401@sss.pgh.pa.us
Whole thread Raw
In response to Re: lower() and unaccent() not leakproof  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: lower() and unaccent() not leakproof
List pgsql-general
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 26.08.21 06:52, David G. Johnston wrote:
>> On Wednesday, August 25, 2021, Christophe Pettus <xof@thebuild.com 
>> <mailto:xof@thebuild.com>> wrote:
>>> lower() and unaccent() (and most string functions) are not marked as
>>> leakproof.  Is this due to possible locale / character encoding
>>> errors they might encounter?

> I think if you trace the code, you might find that lower() and upper() 
> can't really leak anything.  It might be worth taking a careful look and 
> possibly lifting this restriction.

Generally speaking, we've been resistant to marking anything leakproof
unless it has a very small code footprint that can be easily audited.

In particular, anything that shares a lot of infrastructure with
not-leakproof functions seems quite hazardous.  Even if you go through
the code and convince yourself that it's OK today, innocent changes
to the shared infrastructure could break the leakproofness tomorrow.

            regards, tom lane



pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Can we get rid of repeated queries from pg_dump?
Next
From: Tom Lane
Date:
Subject: Re: Can we get rid of repeated queries from pg_dump?