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

From Ideriha, Takeshi
Subject Re: Forbid use of LF and CR characters in database and role names
Date
Msg-id 4E72940DA2BF16479384A86D54D0988A4D820941@G01JPEXMBKW04
Whole thread Raw
In response to Re: Forbid use of LF and CR characters in database and role names  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Forbid use of LF and CR characters in database and role names
List pgsql-hackers
> > [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.

Thanks for your modification.
I applied your fixed patch and new one, and confirmed the applied source passed the tests successfully. And I also
checkedmanually the error messages were emitted successfully when cr/lf are included in dbname or rolename or
data_directory.

AFAICT, this patch satisfies the concept discussed before. So I’ve switched this patch “Ready for Committer”.

Regards, 
Ideriha, Takeshi

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: patch: function xmltable
Next
From: Tomas Vondra
Date:
Subject: confusing checkpoint_flush_after / bgwriter_flush_after