Bug #1694

mod_postgresql_vhost not sending password in connect string

Added by Anonymous 201 days ago. Updated 163 days ago.

Status:Fixed Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:core
Target version:1.5.0
Pending:

No

Resolution:

fixed


Description

mod_postgresql_vhost is not sending the password part of the connect string. Logs show:

mod_postgresql_vhost.c.251: (error) Bad connection for 'host=192.168.1.10 dbname=lighttpd user=lighttpd': fe_sendauth: no password supplied

I played around with src/mod_postgresql_vhost.c and added:

BUFFER_APPEND_STRING_CONST(s->conninfo, " ");
BUFFER_APPEND_STRING_CONST(s->conninfo, "password=");
buffer_append_string_buffer(s->conninfo, s->core->pass);

under the other connect string parts at about line 171 and it is working now.

To get things to compile I also had to remove -lpgport from the

POSTGRESQL_LIBS="$POSTGRESQL_LIBS -lpgport -lpq -lrt"

line in configure.in. Not sure if that is just something with my systems, but it would not compile as there is no pgport library. Removing it allowed compile and it works.

OS: FreeBSD 7.0
Postgresql: postgresql-client-8.2.6_1 from ports
lighttpd-1.5.0-r1992, but appears to be same in trunk

--Matt

-- matt

mod_postgresql_vhost.c.patch - patch to send passwords in src/mod_postgresql_vhost.c -- matt (467 Bytes) Anonymous, 06/20/2008 04:54 PM

History

07/28/2008 09:12 PM - stbuehler

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2239

Also available in: Atom PDF