From: julian.schauder@credativ.de
To: pgsql-bugs@postgresql.org
Subject: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable.
Date: Mon, 04 Apr 2016 19:40:24 +0000
Message-ID: <20160404194024.15198.21684@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14063
Logged by: Julian Schauder
Email address: julian.schauder@credativ.de
PostgreSQL version: 9.5.1
Operating system: Linux, Any
Description:
Howdy Hackers,
PostgreSQLs ALTER SYSTEM accepts a newline in its string-statements. This
will cause the postgresql.auto.conf to become unreadable and requires system
intervention (aka removal of the auto.conf)
postgres=# alter system set work_mem to '5MB
';
ALTER SYSTEM
Time: 37,718 ms
postgres=# alter system set work_mem to '5MB';
ERROR: could not parse contents of file "postgresql.auto.conf"
Time: 0,453 ms
postgres=# alter system reset work_mem ;
ERROR: could not parse contents of file "postgresql.auto.conf"
Time: 0,331 ms
According to code analysis i believe the easiest way around this is
tightening the value validation and ignore whitespaces or just remove
newline as a whitespace.
As this appears to be a new bug is relevant in all versions since ALTER
SYSTEM was introduced.
regards,
julian
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: julian.schauder@credativ.de
Subject: Re: BUG #14063: ALTER SYSTEM accepts 'newline' and renders itself inoperable.
In-Reply-To: <20160404194024.15198.21684@wrigleys.postgresql.org>
References: <20160404194024.15198.21684@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox