nextcloud / nextcloud/server

LDAP error code handling, specify errors that would not end up in a UnavailableServer exception

Open
#7,675 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: ldap
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

In the LDAP Backend we have an wrapper in place that takes care of the error handling. In some occasions, for instance when the server is offline for whatever reason, an exception must be thrown to avoid unpredicatable side effects.

Currently, we hand pick the error cases where an specific expression is thrown, the default is to let them pass through. There are several possible error codes, and as seen in #7662 also some far various states of being effectively offline. The suggestion is to only white list error codes and let only pass those that are acceptable.

It is a hardening approach, as of now no other problems are known by the current approach.

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 by locating the LDAP Backend's error-handling wrapper and review issue #7662 for the offline-server cases it discusses. Identify the error codes that should be allowed through versus those that must produce an UnavailableServer exception, then verify the resulting behavior with the LDAP-related tests available in the repository.

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
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.