Page MenuHomePhabricator

Raise an exception if LDAP search fails
ClosedPublic

Authored by epriestley on Dec 2 2013, 4:17 PM.
Tags
None
Referenced Files
F18824823: D7679.id17339.diff
Oct 23 2025, 6:04 PM
F18808791: D7679.id17338.diff
Oct 19 2025, 8:37 AM
F18577172: D7679.id.diff
Sep 10 2025, 6:01 PM
F18574673: D7679.id17338.diff
Sep 10 2025, 11:28 AM
F18573857: D7679.id17343.diff
Sep 10 2025, 9:49 AM
F18573811: D7679.id17337.diff
Sep 10 2025, 9:40 AM
F18573776: D7679.id17339.diff
Sep 10 2025, 9:27 AM
F18573769: D7679.id17338.diff
Sep 10 2025, 9:25 AM
Subscribers

Details

Summary

Currently, we assume search will always succeed if bind succeeds, but this isn't true in the wild. We don't have a root cause yet, but blunt this error into something vaguely useful rather than passing null to an array typehint and failing later and less usefully.

Test Plan

Used bin/auth ldap.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/auth/PhutilAuthAdapterLDAP.php
401

(This parameter is unused.)

epriestley updated this revision to Unknown Object (????).Dec 2 2013, 5:50 PM
  • We tracked the root cause down to anonymous users being able to search, while credentialed users can not.
  • This is weird, but seems OK to accommodate.
  • After failing a search, try to rebind as anonymous again and redo the search.
epriestley updated this revision to Unknown Object (????).Dec 2 2013, 5:54 PM
  • Minor comment spelling / word choice.