Page MenuHomePhabricator

Phabricator Git authentication does not work on non-public installation
Closed, ResolvedPublic

Description

Line 540 of DiffusionController.php is:

       $user = id(new PhabricatorPeopleQuery())
>>>      ->setViewer(new PhabricatorUser())
         ->withUsernames(array($username))
         ->executeOne();
       if (!$user) {
         // Username doesn't match anything.
         return null;
       }

This should be:

       $user = id(new PhabricatorPeopleQuery())
>>>      ->setViewer(PhabricatorUser::getOmnipotentUser())
         ->withUsernames(array($username))
         ->executeOne();
       if (!$user) {
         // Username doesn't match anything.
         return null;
       }

Otherwise if the default, anonymous user can't search for the user list, then the authentication will always fail.

Event Timeline

waynea assigned this task to epriestley.
waynea raised the priority of this task from to Needs Triage.
waynea updated the task description. (Show Details)
waynea added a project: Diffusion.
waynea added subscribers: waynea, hach-que, Unknown Object (User).