@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.

isSelfURI: fix anchors and relative URIs (that are "self" indeed)

Summary:
Example cases that were wrongly considered external URLs:

- "#foo"
- "/foo"

Note that Phorge usually does not change stable things. In fact this thing
was not documented even inline, and was not even in the unit tests.

So this is a fix, and not a breaking change. Probably no one had ever tried it.

Closes T15182

Test Plan:
The already existing unit tests still work.

The added ones make sense.

There are no problems doing other random things.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15182

Differential Revision: https://we.phorge.it/D25555

+7 -1
+1 -1
src/infrastructure/env/PhabricatorEnv.php
··· 433 433 434 434 $host = $uri->getDomain(); 435 435 if (!phutil_nonempty_string($host)) { 436 - return false; 436 + return true; 437 437 } 438 438 439 439 $host = phutil_utf8_strtolower($host);
+6
src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php
··· 243 243 'https://old.example.com/path/to/resource.png' => true, 244 244 245 245 'https://other.example.com/' => false, 246 + 247 + '/' => true, 248 + '/self' => true, 249 + '#self' => true, 250 + '/#self' => true, 251 + '/self/#self' => true, 246 252 ); 247 253 248 254 foreach ($map as $input => $expect) {