Ticket #2563 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

msencrypt problems with PostGIS connection

Reported by: jmckenna Assigned to: dmorissette
Priority: normal Milestone: 5.0.3 release
Component: PostGIS Interface Version: svn-trunk (development)
Severity: normal Keywords:
Cc:

Description

Testing with 5.0.2, I could not encrypt a password in a PostGIS connection. I was getting the mapserver error:

FAILURE!!!msPOSTGISLayerOpen(): Query error. Couldn't make connection to DB with

connect string 'host=127.0.0.1 dbname=gmap user=postgres password=*************

***** port=5432'.

Through IRC Daniel discovered that a small error in mappostgis.c exists - line 227 should be: layerinfo->conn = PQconnectdb(conn_decrypted);

Change History

03/27/08 16:02:11 changed by dmorissette

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to 5.0.3 release.

As Jeff pointed out the fix was straightforward once we figured the problem (and I need to take blame for not properly testing this in the first place when I implemented RFC-18/ticket #1792).

I also took this opportunity to cleanup a bit the code that masks the password in the connection string in case of errors.

Fixed in r7485 in trunk and r7484 in branch-5-0 (future 5.0.3).