Page MenuHomePhabricator

Raise an exception if LDAP search fails
ClosedPublic

Authored by epriestley on Dec 2 2013, 4:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 3, 3:29 PM
Unknown Object (File)
Mon, Sep 2, 3:16 AM
Unknown Object (File)
Sun, Sep 1, 8:14 PM
Unknown Object (File)
Sun, Sep 1, 12:26 PM
Unknown Object (File)
Sat, Aug 31, 5:13 AM
Unknown Object (File)
Thu, Aug 22, 8:30 AM
Unknown Object (File)
Mon, Aug 19, 1:35 PM
Unknown Object (File)
Thu, Aug 15, 7:47 PM
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.