Page MenuHomePhabricator

Fix issue where Git authentication would always 403 on non-public install.
ClosedPublic

Authored by hach-que on Nov 4 2013, 7:12 AM.
Tags
None
Referenced Files
F18116496: D7489.id16878.diff
Wed, Aug 13, 7:28 AM
F18114977: D7489.id.diff
Wed, Aug 13, 6:04 AM
F18108429: D7489.diff
Aug 11 2025, 6:56 AM
F18100106: D7489.diff
Aug 9 2025, 11:04 AM
F18092465: D7489.id16874.diff
Aug 7 2025, 10:41 AM
F17683812: D7489.id16874.diff
Jul 14 2025, 12:54 AM
F17674637: D7489.id.diff
Jul 13 2025, 7:27 AM
Unknown Object (File)
May 7 2025, 6:49 PM

Details

Summary

This fixes an issue where Git authentication would always fail on an install with policy.allow-public set to false. This is because when public access is allowed, anonymous users can query the user list. However, when public access is not allowed, you have to be authenticated before you can read any of the user objects.

Test Plan

Prior to this fix, I get:

james@james-laptop:~/git/8> git clone http://phabricator.local/diffusion/TEST/
Cloning into 'TEST'...
fatal: unable to access 'http://phabricator.local/diffusion/TEST/': The requested URL returned error: 403

when policy.allow-public is false. After this fix I get:

james@james-laptop:~/git/8> git clone http://phabricator.local/diffusion/TEST/
Cloning into 'TEST'...
remote: Counting objects: 102, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 102 (delta 6), reused 0 (delta 0)
Receiving objects: 100% (102/102), 9.89 KiB | 0 bytes/s, done.
Resolving deltas: 100% (6/6), done.
Checking connectivity... done

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley closed this revision.

Closed by commit rP0ceb53bfae28 (authored by @hach-que, committed by @epriestley).