@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Git prompt for passwords when the user provides a username but not a password

Summary: Fixes T10797. This seems to fix things on my local system.

Test Plan:
- Cloned with a username, got prompted for a password.
- Cloned with a username + password.
- Cloned with a username + bad password (error).

Reviewers: chad

Reviewed By: chad

Subscribers: Grimeh

Maniphest Tasks: T10797

Differential Revision: https://secure.phabricator.com/D15706

+8 -1
+8 -1
src/applications/diffusion/controller/DiffusionServeController.php
··· 164 164 165 165 // If authentication credentials have been provided, try to find a user 166 166 // that actually matches those credentials. 167 - if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { 167 + 168 + // We require both the username and password to be nonempty, because Git 169 + // won't prompt users who provide a username but no password otherwise. 170 + // See T10797 for discussion. 171 + 172 + $have_user = strlen(idx($_SERVER, 'PHP_AUTH_USER')); 173 + $have_pass = strlen(idx($_SERVER, 'PHP_AUTH_PW')); 174 + if ($have_user && $have_pass) { 168 175 $username = $_SERVER['PHP_AUTH_USER']; 169 176 $password = new PhutilOpaqueEnvelope($_SERVER['PHP_AUTH_PW']); 170 177