Page MenuHomePhabricator

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

Authored by epriestley on Oct 12 2015, 11:08 PM.
Tags
None
Referenced Files
F15387473: D14260.id34425.diff
Sat, Mar 15, 2:27 AM
F15383608: D14260.id34425.diff
Fri, Mar 14, 5:20 PM
Unknown Object (File)
Feb 18 2025, 4:18 PM
Unknown Object (File)
Feb 18 2025, 2:02 AM
Unknown Object (File)
Feb 14 2025, 3:45 AM
Unknown Object (File)
Feb 14 2025, 3:45 AM
Unknown Object (File)
Feb 9 2025, 1:45 PM
Unknown Object (File)
Feb 8 2025, 11:31 PM
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.