Page MenuHomePhabricator

Phabricator links in commit messages mangled if linking to defunct Labs test instance
Closed, DeclinedPublic

Description


Version: wmf-deployment
Severity: minor

Details

Reference
bz73160

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 3:58 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz73160.
bzimport added a subscriber: Unknown Object (MLST).

It's a link to the test instance, so probably no one needs this in future. Still, the malformed HTML should not show up.

We added a linking for /T\d+/ or something similar. Since it's using a regex and not a parser it doesn't notice that the task reference is in a quoted string.

There's probably a dupe of this bug.(In reply to Bryan Davis from comment #2)

We added a linking for /T\d+/ or something similar. Since it's using a regex
and not a parser it doesn't notice that the task reference is in a quoted
string.

Far too simple of a regex :)

This request sounds so harmless, but we're hitting some edge-cases here:

  • Gerrit's Issue Tracker framework relies on the first group being the id of the issue tracker.

    So we cannot do something in the spirit of

    ([^a-zA-Z0-9/])T(\d+)

    as then, Gerrit would take the ([^a-zA-Z0-9/]) as task number.
  • Gerrit's commentlinks cannot do non-capturing groups.

    So we cannot do something in the spirit of

    (?:[^a-zA-Z0-9/])T(\d+)

    .
  • Gerrit's commentlinks cannot do lookbehinds

    So we cannot do something in the spirit of

    (?<![a-zA-Z0-9/])T(\d+)

    .

Since the Gerrit's commentlinks code is doing weird things to make
sure it is safe html, I guess it's easiest thing would be to patch Gerrit's
Issue Tracker framework to allow to specify which group number is the
issue tracker id.

Labs test instance is dead. Proposing WONTFIX/declined.

Rillke claimed this task.