Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15375435
D21759.id.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
D21759.id.diff
View Options
diff --git a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
@@ -229,11 +229,19 @@
$commit);
if (!$err) {
- $tmp = new TempFile();
- Filesystem::writeFile($tmp, $contents);
- list($module_info) = $repository->execxLocalCommand(
- 'config -l -f %s',
- $tmp);
+
+ // NOTE: After T13673, the user executing "git" may not be the same
+ // as the user this process is running as (usually the webserver user),
+ // so we can't reliably use a temporary file: the daemon user may not
+ // be able to use it.
+
+ // Use "--file -" to read from stdin instead. If this fails in some
+ // older versions of Git, we could exempt this particular command from
+ // sudoing to the daemon user.
+
+ $future = $repository->getLocalCommandFuture('config -l --file - --');
+ $future->write($contents);
+ list($module_info) = $future->resolvex();
$dict = array();
$lines = explode("\n", trim($module_info));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 11:12 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7462575
Default Alt Text
D21759.id.diff (1 KB)
Attached To
Mode
D21759: Fix an issue where "git" may be unable to read a temporary file in Diffusion
Attached
Detach File
Event Timeline
Log In to Comment