pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: lower() and unaccent() not leakproof
Date: Thu, 26 Aug 2021 09:58:13 +0200
Message-ID: <b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.com> (raw)
In-Reply-To: <CAKFQuwYtO2ifxXzqL7BTgyjZFfUGcv=gyH9Gu+LkQQ163ib_=Q@mail.gmail.com>
References: <02BDFCCF-BDBB-4658-9717-4D95F9A91561@thebuild.com>
	<CAKFQuwYtO2ifxXzqL7BTgyjZFfUGcv=gyH9Gu+LkQQ163ib_=Q@mail.gmail.com>

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 you are partially correct.  Its due to the fact that error 
> messages, regardless of the root cause, result in the printing of the 
> input value in the error message as context, thus exists a leak via a 
> violation of “ It reveals no information about its arguments other than 
> by its return value. ”

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.





view thread (9+ messages)  latest in thread

Message-ID: <b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.com>
Permalink:  ../b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.com/
Also on:    postgresql.org/message-id/b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.com

 · 

reply

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-general@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, david.g.johnston@gmail.com, xof@thebuild.com
  Subject: Re: lower() and unaccent() not leakproof
  In-Reply-To: <b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.com>
  References: <02BDFCCF-BDBB-4658-9717-4D95F9A91561@thebuild.com> <CAKFQuwYtO2ifxXzqL7BTgyjZFfUGcv=gyH9Gu+LkQQ163ib_=Q@mail.gmail.com> <b6169dcd-80fd-d0f2-af3f-7d902f06d052@enterprisedb.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