mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Use %B when writing to Harbormaster build logs
Summary: Fixes T7007. Using `%B` permits non-UTF8 data to be appended to Harbormaster build logs. Since we're not really in control of the processes Harbormaster is running remotely, and since they may output invalid UTF8 data, we should store the invalid data instead of failing the build (due to UTF8 exception). Test Plan: @epriestley said this was the right fix, though I haven't tested it on our production system which actually exhibits the issue yet. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7007 Differential Revision: https://secure.phabricator.com/D11532
This commit is contained in:
parent
8798083ad9
commit
6e723c5c5a
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ final class HarbormasterBuildLog extends HarbormasterDAO
|
||||||
'INSERT INTO harbormaster_buildlogchunk '.
|
'INSERT INTO harbormaster_buildlogchunk '.
|
||||||
'(logID, encoding, size, chunk) '.
|
'(logID, encoding, size, chunk) '.
|
||||||
'VALUES '.
|
'VALUES '.
|
||||||
'(%d, %s, %d, %s)',
|
'(%d, %s, %d, %B)',
|
||||||
$this->getID(),
|
$this->getID(),
|
||||||
self::ENCODING_TEXT,
|
self::ENCODING_TEXT,
|
||||||
strlen($content),
|
strlen($content),
|
||||||
|
|
Loading…
Reference in a new issue