Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi41M-0006ep-Ly for pgsql-bugs@arkaria.postgresql.org; Wed, 07 May 2014 15:44:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wi41M-0004qz-0R for pgsql-bugs@arkaria.postgresql.org; Wed, 07 May 2014 15:44:36 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi41K-0004qs-Uk for pgsql-bugs@postgresql.org; Wed, 07 May 2014 15:44:35 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi41H-0003Zz-U0 for pgsql-bugs@postgresql.org; Wed, 07 May 2014 15:44:34 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 408B35F80B; Wed, 7 May 2014 11:44:31 -0400 (EDT) Date: Wed, 7 May 2014 11:44:31 -0400 From: Stephen Frost To: dlo@isam.kiwi Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10250: pgAdmin III 1.16.1 stores unescaped plaintext password Message-ID: <20140507154431.GW2556@tamriel.snowman.net> References: <20140507043248.1398.38867@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R5TZeBEETMj/Rffs" Content-Disposition: inline In-Reply-To: <20140507043248.1398.38867@wrigleys.postgresql.org> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.11.0-19-generic (x86_64) X-Uptime: 11:41:39 up 29 days, 2:00, 5 users, load average: 0.09, 0.06, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --R5TZeBEETMj/Rffs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ben, * dlo@isam.kiwi (dlo@isam.kiwi) wrote: > When storing credentials for connections into ~/.pgpass the credentials is > stored in delimited plaintext form. Not only is this practise a security > risk,=20 This isn't a bug, it's intentional, and if it goes against your security requirements then simply don't do it. Storing it in .pgpass encrypted would require a password to either be provided (in which case, just don't have the password in the pgpass file..) or for the key to be stored in plain-text somewhere, which would be the same situation. Perhaps there is a feature request in here somewhere to have an ssh-agent like daemon, but there simply hasn't been demand for it. > but when the credential contains the delimiter (colon) it fails to be > read back out and app responds with "invalid credentials". >=20 > x.x.x.x:5432:*:username:password:with:colons Per the fine documentation, you need to escape any such usage with a backslash. Please review: http://www.postgresql.org/docs/9.3/static/libpq-pgpass.html Thanks, Stephen --R5TZeBEETMj/Rffs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJTalTeAAoJEO1sijiDR2RVMLoP/2JHSg/C+1pAJ0SZhRTOSKle UAAOpRvMcbNMxpQoDONHZ/Hm/Fpo0YPqHpp79trcZWoFRkATvwhxecfd2OjmlXON j+HNluVQ4o9NlQGBiUOBUobYpgBGW65UytFcqZlB3KS35AmJC/TzbvRwaBW54CZL hxK2HzB6E/OXdv7MQ0qpA24yzB0JzjgqA2ERya42kEnqQFfBRKsDafov4+KiNt8p vny8cYXRzAj/4ujv81KO5NxvoOOsXobNE6iMIsX5Euq/sIJ/KTqKgJvFZkv1f1Qg TOHPwx4hF/Em14xFBQgKriw4geEWhVaCKjfAI1bZaNqXuIdLiQgBmksyHjqFIcGQ +j0DLds9L6or3tWSpbMKYODFuPG0MjEqUUhl2AMqfwTC7pwe83UAtIxI3JHIpHKm tqb9wXb/I+Lm9hoITqe3GNdDE18blvoSAU/IqTb3oRz5VNDXrntBo6LRysRu6HKP pH6fvTwWgLnKM/VtCXmx9VgaoxRyVqIazBSStDek4ZJ4dVBTGoKzT0gDIK9QYQaB M1HB0vj7vv38peEylzOXzO0EaDleVZMpOmzHHAEXctKqbIh0obk/G7bJZWkLt05U PuZHoNjrORKe7k6ckmwPUJErECmKcW+usqzASzAFfg2zFhhy4XLagy6Mm+gCt0qt szK45i67GpwOSqr3RdCs =LAsC -----END PGP SIGNATURE----- --R5TZeBEETMj/Rffs--