Re: trivial DoS on char recoding

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: trivial DoS on char recoding
Дата
Msg-id 20060621064356.GA6149@svana.org
обсуждение исходный текст
Ответ на Re: trivial DoS on char recoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jun 20, 2006 at 06:10:38PM -0400, Tom Lane wrote:
> > Should we get firmer in rejecting invalid configurations?
>
> The question is how sure are we whether a configuration is "invalid".
> AFAIK there's not a really portable way to determine which encoding
> matches a locale.  initdb has a kluge that seems to work most of the
> time, but do we want the database to refuse to start when it doesn't?

Well, this "kludge" is the recommended and documented way to do it on
glibc based systems as well as many others.

It turns out however that there is a libcharset[1] for portably
determining the charset for your current locale. What's most
interesting about it is that it has tables for various OSes and
mappings from their names to standard names (the ones used by Glibc).
It's LGPL so we can't include the stuff verbatim, but it's not a lot of
code.

I'm not sure why we persist in beleiving this test is so unreliable we
won't even emit a warning...

[1] http://www.haible.de/bruno/packages-libcharset.html

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: shall we have a TRACE_MEMORY mode
Следующее
От: "John Jawed"
Дата:
Сообщение: [ppa][PATCHES] Argument handling improvements