Exception and stacktrace when username not foudn on ldap
Open
Nobody has claimed this yet.
1 - To develop
blue-ticket
bug
p3-medium
sev3-medium
- Dominant language
- PHP
- Stars
- 17
- Forks
- 19
- Avg merge
- 11h 40m
- Merged PRs (30d)
- 2
Description
@jvillafanez:
The problem comes from https://github.com/owncloud/user_ldap/blob/master/lib/User_LDAP.php#L101 where we throw a plain exception intended to be used when we don't find the user. We CAN'T distinguish that exception from any other that could happen when we check for the password (https://github.com/owncloud/user_ldap/blob/master/lib/User_LDAP.php#L118)
Changing the log level might not be a good solution because any other exception will also be silenced, specially those that aren't expected. This will make debugging more annoying.
We should add a good exception handling, probably after all the rewrite @butonic is doing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/User_LDAP.php around lines 101 and 118, reading how the plain exception for a missing user is handled during password checking. Reproduce the missing-username case and compare it with an unexpected password-check exception. Done means these cases are distinguishable, with unexpected exceptions still visible for debugging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100