mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
No description
084303cd5f
Summary: Entering a malformed string (like `"pHoRgE rOcKs!!"`) into the "Raw Diff" field, Arcanist's `tryMatchHeader()` function is first called in `$ok = $this->tryMatchHeader($patterns, $line, $match)` with a non-null `$line` value (the first line entered in the "Raw Diff" field) being passed. Afterwards, `tryMatchHeader()` is called for a second time after assigning `$line = $this->nextLineThatLooksLikeDiffStart()`. This time `$line` is null and a RuntimeException is thrown, as `tryMatchHeader()` calls `preg_match()` which does not accept passing null as the $subject string parameter in PHP 8.1. Thus add a `phutil_nonempty_string()` check if the `$subject` parameter (in this case, `$line`) is a non-empty string. Arcanist's `tryMatchHeader()` function is not called outside of the file in which it is defined. Thus catch the exception in the second call to `tryMatchHeader()` and not in the code of the `tryMatchHeader()` function itself. Closes T15338 Test Plan: After adding the additional check, `/differential/diff/create/` showed the expected `Diff Parse Exception` instead. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15338 Differential Revision: https://we.phorge.it/D25183 |
||
---|---|---|
bin | ||
externals | ||
resources | ||
scripts | ||
src | ||
support | ||
.arcconfig | ||
.arclint | ||
.arcunit | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
NOTICE | ||
README.md |
Arcanist is the command-line tool for Phorge. It allows you to interact with Phorge installs to send code for review, download patches, transfer files, view status, make API calls, and various other things. You can read more in the User Guide
For more information about Phorge, see https://phorge.it/.
LICENSE
Arcanist is released under the Apache 2.0 license except as otherwise noted.