Re: Forbid use of LF and CR characters in database and role names - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Forbid use of LF and CR characters in database and role names
Date
Msg-id CAB7nPqS2-5AC=a-OXEQuPNYfiZWvJ_axv7GWfEouW+52QG82LA@mail.gmail.com
Whole thread Raw
In response to Re: Forbid use of LF and CR characters in database and role names  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Fri, Sep 2, 2016 at 2:44 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 8/11/16 9:12 PM, Michael Paquier wrote:
>> Note that pg_dump[all] and pg_upgrade already have safeguards against
>> those things per the same routines putting quotes for execution as
>> commands into psql and shell. So attached is a patch to implement this
>> restriction in the backend,
>
> How about some documentation?  I think the CREATE ROLE and CREATE
> DATABASE man pages might be suitable places.

Sure. What do you think about that?
+  <para>
+    Database names cannot include <literal>LF</> or <literal>CR</> characters
+    as those could be at the origin of security breaches, particularly on
+    Windows where the command shell is unusable with arguments containing
+    such characters.
+   </para>
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [Patch] RBTree iteration interface improvement
Next
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take