1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 11:52:40 +01:00
phorge-phorge/src/infrastructure/util
epriestley 3ff5ca789a Fix /tag/aa%20bb project URIs
Summary:
Ref T9551. To set things up:

  - Name a project `aa bb`. This will have the tag `aa_bb`.
  - Try to visit `/tag/aa%20bb`.

Here's what happens now:

  - You get an Aphront redirect error as it tries to add the trailing `/`. Add `phutil_escape_uri()` so that works again.
  - Then, you 404, even though this tag is reasonably equivalent to the real project tag and could be redirected. Add a fallback to lookup, resolve, and redirect if we can find a hit for the tag.

This also fixes stuff like `/tag/AA_BB/`.

Test Plan: Visited URIs like `/tag/aa%20bb`, `/tag/aa%20bb/`, `/tag/Aa_bB/`, etc. None of them worked before and now they all do.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9551

Differential Revision: https://secure.phabricator.com/D14260
2015-10-12 17:02:42 -07:00
..
__tests__ Various linter fixes 2015-08-11 22:36:55 +10:00
password Use phutil_hashes_are_identical() when comparing hashes in Phabricator 2015-09-01 15:52:44 -07:00
PhabricatorGlobalLock.php Improve messaging around repository locks 2015-04-27 10:25:53 -07:00
PhabricatorHash.php phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorSlug.php Fix /tag/aa%20bb project URIs 2015-10-12 17:02:42 -07:00
PhabricatorSSHKeyGenerator.php Add a "Generate Keypair" option on the SSH Keys panel 2014-03-12 18:17:11 -07:00