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

Don't handle JIRA/Asana URIs with anchors or query parameters in a special way (with Doorkeeper)

Summary:
Ref T13291. See PHI1312. Currently, if you link to a JIRA or Asana issue with an anchor (`#asdf`) or query parameters (`?a=b`), we:

- treat the link as an external object reference and attempt a lookup on it;
- if the lookup succeeds, we discard the fragment or parameters when re-rendering the rich link (with the issue/task title).

Particularly, the re-rendering part uses the canonical URI of the object, and can discard these parameters/fragments, which is broken/bad.

As a first pass at improving this, just don't apply special behavior for links with anchors or parameters -- simply treat them as links.

In some future change, we could specialize this behavior and permit certain known parameters or anchors or something, but these use cases are likely fairly marginal.

Test Plan:
Before:

{F6516392}

After:

{F6516393}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13291

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

+16
+8
src/applications/auth/provider/PhabricatorAsanaAuthProvider.php
··· 59 59 return null; 60 60 } 61 61 62 + if (strlen($uri->getFragment())) { 63 + return null; 64 + } 65 + 66 + if ($uri->getQueryParamsAsPairList()) { 67 + return null; 68 + } 69 + 62 70 $context_id = $matches[1]; 63 71 $task_id = $matches[2]; 64 72
+8
src/applications/auth/provider/PhabricatorJIRAAuthProvider.php
··· 341 341 return null; 342 342 } 343 343 344 + if (strlen($uri->getFragment())) { 345 + return null; 346 + } 347 + 348 + if ($uri->getQueryParamsAsPairList()) { 349 + return null; 350 + } 351 + 344 352 $domain = $matches[1]; 345 353 $issue = $matches[2]; 346 354