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 CAB7nPqQUkjdnx+KUwLS7dOt37V_2J1nGt9Ep44uHg=ET+oGmjA@mail.gmail.com
Whole thread Raw
In response to Re: Forbid use of LF and CR characters in database and role names  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
Responses Re: Forbid use of LF and CR characters in database and role names
List pgsql-hackers
On Tue, Nov 22, 2016 at 5:55 PM, Ideriha, Takeshi
<ideriha.takeshi@jp.fujitsu.com> wrote:
> Here's a summary for what I tested  in RHEL7.0, details follow.

Thanks for the review.

> [Summary]
> 1. apply patch and make world
>   -> failed because </para> was mistakenly coded <para>.
>
> 2.correct this mistake and make check-world
>   -> got 1 failed test: "'pg_dumpall with \n\r in database name'"
>      because test script cannot createdb "foo\n\rbar"

The attached version addresses those problems. I have replaced the
test in src/bin/pg_dump/t/ by tests in src/bin/scripts/t/ to check if
the role name and database name with CR or LF fail to be created. I
have as well added a test for initdb when the data directory has an
incorrect character in 0002.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Rushabh Lathia
Date:
Subject: Re: Declarative partitioning - another take
Next
From: "K S, Sandhya (Nokia - IN/Bangalore)"
Date:
Subject: Re: Postgres abort found in 9.3.11