@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix {Fnnn} rule in Remarkup

Summary:
Remarkup rule callbacks now get SafeHTML matches instead of string matches. If they call:

$some_lisk_dao->load($matches[1]);

..as is the case with the `{F123}` rule, we reject the SafeHTML as an invalid ID and return null.

Allow load() to string convert any object (which will either succeed or fatal in an obviously-broken way).

(Long ago we threw instead of returning null here, but it meant we had to do a lot of redundant checks.)

Test Plan: `{F123}` shows an image again. `{C1}` embeds a countdown.

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4961

+5 -1
+1 -1
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 41 41 42 42 private $objects = array(); 43 43 private $viewer; 44 - private $version = 3; 44 + private $version = 4; 45 45 46 46 47 47 /* -( Markup Pipeline )---------------------------------------------------- */
+4
src/infrastructure/storage/lisk/LiskDAO.php
··· 406 406 * @task load 407 407 */ 408 408 public function load($id) { 409 + if (is_object($id)) { 410 + $id = (string)$id; 411 + } 412 + 409 413 if (!$id || (!is_int($id) && !ctype_digit($id))) { 410 414 return null; 411 415 }