Skip to content

Massive LDAP connection leak? #435

Description

@gitblit

Originally reported on Google Code with ID 139

What steps will reproduce the problem?
1. Configure Gitblit to use LDAP authentication
2. Each authentication request creates new LDAP connection which doesn't get closed
(can be easily verified with netstat)

What is the expected output? What do you see instead?

Less LDAP connections :)

What version of the product are you using? On what operating system?

Gitblit 1.1.0 (GO), Linux

Please provide any additional information below.

After look at https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/LdapUserService.java
I think the culprit is the method authenticate which get a new LDAPConnection but newer
closes it. (See also https://www.unboundid.com/products/ldapsdk/docs/javadoc/com/unboundid/ldap/sdk/LDAPConnection.html#close().)

I assume a finally clause could help here (with null check of course).

Reported by SleeplessAnnoyedNerd on 2012-09-26 20:09:26

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions