Page MenuHomePhabricator

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

Authored by epriestley on Oct 12 2015, 11:08 PM.
Tags
None
Referenced Files
F14357810: D14260.diff
Fri, Dec 20, 6:55 AM
Unknown Object (File)
Tue, Dec 17, 8:01 AM
Unknown Object (File)
Mon, Dec 9, 5:09 AM
Unknown Object (File)
Wed, Dec 4, 5:47 PM
Unknown Object (File)
Sun, Dec 1, 3:28 AM
Unknown Object (File)
Wed, Nov 20, 6:06 PM
Unknown Object (File)
Nov 16 2024, 8:33 PM
Unknown Object (File)
Nov 8 2024, 12:37 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.