Re: lower() and unaccent() not leakproof

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: lower() and unaccent() not leakproof
Дата
Msg-id B639B186-C347-479F-AB0C-8936DEFB0190@yesql.se
обсуждение исходный текст
Ответ на Re: lower() and unaccent() not leakproof  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: lower() and unaccent() not leakproof  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-general
> On 26 Aug 2021, at 09:58, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>
> 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
theprinting of the input value in the error message as context, thus exists a leak via a violation of “ It reveals no
informationabout 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
takinga careful look and possibly lifting this restriction. 

Wouldn’t the difference in possible error messages in upper/lower be able to
leak whether the input is ascii or wide chars, and/or the collation?

--
Daniel Gustafsson        https://vmware.com/




В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: lower() and unaccent() not leakproof
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Can we get rid of repeated queries from pg_dump?