Homec4science

Fix `/tag/aa%20bb` project URIs

Authored by epriestley <git@epriestley.com> on Oct 13 2015, 02:02.

Description

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

Details

Committed
epriestley <git@epriestley.com>Oct 13 2015, 02:02
Pushed
aubortJan 31 2017, 17:16
Parents
rPH1bdf22535414: Use Drydock authorizations when acquiring leases
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH3ff5ca789a60: Fix `/tag/aa%20bb` project URIs (authored by epriestley <git@epriestley.com>).Oct 13 2015, 02:02