owncloud / owncloud/user_ldap

Exception and stacktrace when username not foudn on ldap

Open
#166 4 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.