mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Apply phutil_utf8ize() to stderr output from VCS commands prior to logging
Summary: Ref T10228. Commands like `git-http-backend` can emit errors with raw bytes in the output. Sanitize these if present so we can log them in JSON format. Test Plan: Edited this into production. >_> sneaky sneaky <_< Reviewers: chad Reviewed By: chad Maniphest Tasks: T10228 Differential Revision: https://secure.phabricator.com/D15144
This commit is contained in:
parent
41262150df
commit
e5947e08d3
1 changed files with 4 additions and 1 deletions
|
@ -466,7 +466,10 @@ final class DiffusionServeController extends DiffusionController {
|
||||||
if ($err) {
|
if ($err) {
|
||||||
return new PhabricatorVCSResponse(
|
return new PhabricatorVCSResponse(
|
||||||
500,
|
500,
|
||||||
pht('Error %d: %s', $err, $stderr));
|
pht(
|
||||||
|
'Error %d: %s',
|
||||||
|
$err,
|
||||||
|
phutil_utf8ize($stderr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return id(new DiffusionGitResponse())->setGitData($stdout);
|
return id(new DiffusionGitResponse())->setGitData($stdout);
|
||||||
|
|
Loading…
Reference in a new issue