Skip to content

LDAP team retrieval using wrong credentials #833

@gitblit

Description

@gitblit

Originally reported on Google Code with ID 537

What steps will reproduce the problem?
Configure gitblit to use LDAP authorization and read teams from LDAP. Specify LDAP
manager credentials for gitblit to use.

What is the expected output? What do you see instead?
The expected behavior is for gitblit to check team memberships for a user by using
the manager account, not that user's account since that user may not have the privileges
to see team memberships.

What version of the product are you using? On what operating system?
1.6.2 on Jetty 9, CentOS 6.3

Please provide any additional information below.
Browsing the source code, I noticed that after binding with the manager account, gitblit
rebinds as the user trying to log in (the comment says this is to prevent an LDAP injection
attack). Team memberships are then read after this, while bound to the LDAP server
as the user trying to log in, not the manager. I believe this is wrong since the user
doesn't have to be authorized to read team memberships.

Reported by [email protected] on 2014-11-22 01:21:32

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions