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

Differental - match "Revision ID:" uri value on domain only

Summary: pre-patch, we match on things like https / http and port... just match domains. Fixes T5693.

Test Plan: arc diff -> arc land and the diff was closed correctly

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5693

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

+8 -4
+8 -4
src/applications/differential/customfield/DifferentialRevisionIDField.php
··· 47 47 $this->revisionID = $value; 48 48 } 49 49 50 - private static function parseRevisionIDFromURI($uri) { 51 - $path = id(new PhutilURI($uri))->getPath(); 50 + private static function parseRevisionIDFromURI($uri_string) { 51 + $uri = new PhutilURI($uri_string); 52 + $path = $uri->getPath(); 52 53 53 54 $matches = null; 54 55 if (preg_match('#^/D(\d+)$#', $path, $matches)) { 55 56 $id = (int)$matches[1]; 57 + 58 + $prod_uri = new PhutilURI(PhabricatorEnv::getProductionURI('/D'.$id)); 59 + 56 60 // Make sure the URI is the same as our URI. Basically, we want to ignore 57 61 // commits from other Phabricator installs. 58 - if ($uri == PhabricatorEnv::getProductionURI('/D'.$id)) { 62 + if ($uri->getDomain() == $prod_uri->getDomain()) { 59 63 return $id; 60 64 } 61 65 62 66 $allowed_uris = PhabricatorEnv::getAllowedURIs('/D'.$id); 63 67 64 68 foreach ($allowed_uris as $allowed_uri) { 65 - if ($uri == $allowed_uri) { 69 + if ($uri_string == $allowed_uri) { 66 70 return $id; 67 71 } 68 72 }