Commit 67f6d752 authored by jplang's avatar jplang

Connection leak in Redmine.pm (#19956).

Patch by Bruno Orcha García.

git-svn-id: https://svn.redmine.org/redmine/trunk@14281 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f91fee7a
......@@ -453,7 +453,6 @@ sub is_member {
my $redmine_pass = shift;
my $r = shift;
my $dbh = connect_database($r);
my $project_id = get_project_identifier($r);
my $pass_digest = Digest::SHA::sha1_hex($redmine_pass);
......@@ -466,6 +465,7 @@ sub is_member {
$usrprojpass = $cfg->{RedmineCacheCreds}->get($redmine_user.":".$project_id.":".$access_mode);
return 1 if (defined $usrprojpass and ($usrprojpass eq $pass_digest));
}
my $dbh = connect_database($r);
my $query = $cfg->{RedmineQuery};
my $sth = $dbh->prepare($query);
$sth->execute($redmine_user, $project_id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment