pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Parse more strictly integer parameters from connection strings i
Date: Tue, 11 Sep 2018 21:48:56 +0000
Message-ID: <E1fzqWm-0000kx-HO@gemulon.postgresql.org> (raw)

Parse more strictly integer parameters from connection strings in libpq

The following parameters have been parsed in lossy ways when specified
in a connection string processed by libpq:
- connect_timeout
- keepalives
- keepalives_count
- keepalives_idle
- keepalives_interval
- port

Overflowing values or the presence of incorrect characters were not
properly checked, leading to libpq trying to use such values and fail
with unhelpful error messages.  This commit hardens the parsing of those
parameters so as it is possible to find easily incorrect values.

Author: Fabien Coelho
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/alpine.DEB.2.21.1808171206180.20841@lancre

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e7a2217978d9cbb2149bfcb4ef1e45716cfcbefb

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 63 +++++++++++++++++++++++++++++++++------
1 file changed, 54 insertions(+), 9 deletions(-)



Message-ID: <E1fzqWm-0000kx-HO@gemulon.postgresql.org>
Permalink:  ../E1fzqWm-0000kx-HO@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fzqWm-0000kx-HO@gemulon.postgresql.org

 · 

reply

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-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Parse more strictly integer parameters from connection strings i
  In-Reply-To: <E1fzqWm-0000kx-HO@gemulon.postgresql.org>
  References: <E1fzqWm-0000kx-HO@gemulon.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