[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: [HACKERS] Multibyte bug in hba.c regular expression processing
From: Tom Lane <tgl () sss ! pgh ! pa ! us>
Date: 2013-07-31 13:58:36
Message-ID: 11727.1375279116 () sss ! pgh ! pa ! us
[Download RAW message or body]
It appears to me that check_ident_usermap() will substitute incorrectly
for \1 if the user name contains any multibyte characters, because
it supposes that the "rm_so" and "rm_eo" numbers returned by pg_regexec()
are byte offsets, when in reality they are character offsets.
Correct code for this would need to use charlen_to_bytelen() to navigate
the string to the proper places, as is done in replace_text_regexp() for
example.
I'm not terribly excited about fixing this myself, but perhaps someone
else would like to.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic