Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14018402
D7490.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
D7490.diff
View Options
Index: src/applications/diffusion/controller/DiffusionController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionController.php
+++ src/applications/diffusion/controller/DiffusionController.php
@@ -180,7 +180,7 @@
switch ($repository->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
- $result = $this->serveGitRequest($repository);
+ $result = $this->serveGitRequest($repository, $viewer);
break;
default:
$result = new PhabricatorVCSResponse(
@@ -192,9 +192,11 @@
$code = $result->getHTTPResponseCode();
if ($is_push && ($code == 200)) {
- $repository->writeStatusMessage(
- PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
- PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
+ $repository->writeStatusMessage(
+ PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
+ PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ unset($unguarded);
}
return $result;
@@ -454,7 +456,9 @@
/**
* @phutil-external-symbol class PhabricatorStartup
*/
- private function serveGitRequest(PhabricatorRepository $repository) {
+ private function serveGitRequest(
+ PhabricatorRepository $repository,
+ PhabricatorUser $viewer) {
$request = $this->getRequest();
$request_path = $this->getRequestDirectoryPath();
@@ -492,8 +496,9 @@
'GIT_HTTP_EXPORT_ALL' => '1',
'PATH_INFO' => $request_path,
+ 'REMOTE_USER' => $viewer->getUsername(),
+
// TODO: Set these correctly.
- 'REMOTE_USER' => '',
// GIT_COMMITTER_NAME
// GIT_COMMITTER_EMAIL
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 11:12 AM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748883
Default Alt Text
D7490.diff (1 KB)
Attached To
Mode
D7490: Disable CSRF checks on Git push when updating repository.
Attached
Detach File
Event Timeline
Log In to Comment