Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14844132
D15706.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
987 B
Referenced Files
None
Subscribers
None
D15706.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionServeController.php b/src/applications/diffusion/controller/DiffusionServeController.php
--- a/src/applications/diffusion/controller/DiffusionServeController.php
+++ b/src/applications/diffusion/controller/DiffusionServeController.php
@@ -164,7 +164,14 @@
// If authentication credentials have been provided, try to find a user
// that actually matches those credentials.
- if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
+
+ // We require both the username and password to be nonempty, because Git
+ // won't prompt users who provide a username but no password otherwise.
+ // See T10797 for discussion.
+
+ $have_user = strlen(idx($_SERVER, 'PHP_AUTH_USER'));
+ $have_pass = strlen(idx($_SERVER, 'PHP_AUTH_PW'));
+ if ($have_user && $have_pass) {
$username = $_SERVER['PHP_AUTH_USER'];
$password = new PhutilOpaqueEnvelope($_SERVER['PHP_AUTH_PW']);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 3, 1:24 PM (21 h, 38 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7086993
Default Alt Text
D15706.diff (987 B)
Attached To
Mode
D15706: Make Git prompt for passwords when the user provides a username but not a password
Attached
Detach File
Event Timeline
Log In to Comment