Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13976391
D7508.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7508.diff
View Options
Index: src/applications/diffusion/controller/DiffusionController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionController.php
+++ src/applications/diffusion/controller/DiffusionController.php
@@ -8,6 +8,8 @@
$request = $this->getRequest();
$uri = $request->getRequestURI();
+ $user_agent = idx($_SERVER, 'HTTP_USER_AGENT');
+
// Check if this is a VCS request, e.g. from "git clone", "hg clone", or
// "svn checkout". If it is, we jump off into repository serving code to
// process the request.
@@ -27,6 +29,8 @@
//
// ...to get a human-readable error.
$vcs = $request->getExists('__vcs__');
+ } else if (strncmp($user_agent, "git/", 4) === 0) {
+ $vcs = PhabricatorRepositoryType::REPOSITORY_TYPE_GIT;
} else if ($request->getExists('service')) {
$service = $request->getStr('service');
// We get this initially for `info/refs`.
@@ -541,6 +545,16 @@
return null;
}
+ if (!strlen($username)) {
+ // No username.
+ return null;
+ }
+
+ if (!strlen($password->openEnvelope())) {
+ // No password.
+ return null;
+ }
+
$user = id(new PhabricatorPeopleQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withUsernames(array($username))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 19, 2:03 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716607
Default Alt Text
D7508.diff (1 KB)
Attached To
Mode
D7508: Don't throw when user tries to use an empty password via HTTP auth
Attached
Detach File
Event Timeline
Log In to Comment