Re: trivial DoS on char recoding - Mailing list pgsql-hackers

From Tom Lane
Subject Re: trivial DoS on char recoding
Date
Msg-id 1271.1150841438@sss.pgh.pa.us
Whole thread Raw
In response to trivial DoS on char recoding  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: trivial DoS on char recoding  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Note that the PO file for the spanish translation is written in Latin1,
> not UTF8.  So I can adventure that the server is trying to recode a
> string which is originally in Latin1, but assuming it is UTF-8, to
> Win1250.

Yeah, this is a known problem --- basically it seems a shortcoming of
the gettext() API.  You can find details in the archives.

> 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?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: union all bug?
Next
From: Bruce Momjian
Date:
Subject: My new email address