Project

General

Profile

Bug #1694

mod_postgresql_vhost not sending password in connect string

Added by Anonymous about 11 years ago. Updated about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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 (467 Bytes) mod_postgresql_vhost.c.patch patch to send passwords in src/mod_postgresql_vhost.c -- matt Anonymous, 2008-06-20 16:54

History

#1

Updated by stbuehler about 11 years ago

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

Fixed in r2239

Also available in: Atom