Page MenuHomePhabricator

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

Authored by epriestley on Oct 12 2015, 11:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 8:33 PM
Unknown Object (File)
Thu, Apr 11, 7:19 AM
Unknown Object (File)
Tue, Apr 9, 11:10 AM
Unknown Object (File)
Tue, Apr 9, 2:35 AM
Unknown Object (File)
Mar 18 2024, 7:20 PM
Unknown Object (File)
Mar 17 2024, 8:42 PM
Unknown Object (File)
Mar 11 2024, 7:12 PM
Unknown Object (File)
Mar 11 2024, 2:24 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
projslug1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8240
Build 9430: Run Core Tests
Build 9429: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Fix `/tag/aa%20bb` project URIs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 12 2015, 11:58 PM
This revision was automatically updated to reflect the committed changes.