summaryrefslogtreecommitdiff
path: root/perl-lib/PgCommitFest/Handler.pm
diff options
context:
space:
mode:
authorMagnus Hagander2013-12-15 14:04:23 +0000
committerMagnus Hagander2013-12-15 14:04:23 +0000
commit2f87c62b5e185122a74e98218c348b1da42db736 (patch)
tree533a15ece78c45f61dade39b41635265ce1dd844 /perl-lib/PgCommitFest/Handler.pm
parent74117d310c0d13e7f1e450b7411a17faa5f9430b (diff)
Get username and password from separate variables for loginHEADmaster
This should hopefully keep them out of error messages, and thus not leak the login details if there is a network problem.
Diffstat (limited to 'perl-lib/PgCommitFest/Handler.pm')
-rw-r--r--perl-lib/PgCommitFest/Handler.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-lib/PgCommitFest/Handler.pm b/perl-lib/PgCommitFest/Handler.pm
index 097b7e7..77e7a62 100644
--- a/perl-lib/PgCommitFest/Handler.pm
+++ b/perl-lib/PgCommitFest/Handler.pm
@@ -99,7 +99,13 @@ sub login {
my $pg_login_db =
PgCommitFest::DB->connect(defined $ENV{'PGCOMMITFEST_LOGIN_DB'} ?
$ENV{'PGCOMMITFEST_LOGIN_DB'}
- : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest', '', '');
+ : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest',
+ defined $ENV{'PGCOMMITFEST_LOGIN_DB_USERNAME'} ?
+ $ENV{'PGCOMMITFEST_LOGIN_DB_USERNAME'} : '',
+
+ defined $ENV{'PGCOMMITFEST_LOGIN_DB_PASSWORD'} ?
+ $ENV{'PGCOMMITFEST_LOGIN_DB_PASSWORD'} : ''
+ );
my $u = $pg_login_db->select_one(<<EOM,
SELECT userid_p AS userid FROM community_login(?, ?) WHERE success != 0
EOM