visd / VISD-Badges

VISD Badges
Other
0 stars 0 forks source link

URL router needs to be blast-proof #29

Open argybarg opened 11 years ago

argybarg commented 11 years ago

The routing needs to either reject faulty URLs or intelligently rewrite them. For instance:

/skillsets/45/challenges/18/entries/3

Needs to rewrite to:

challenges/18/entries/3

But what about:

ivegotalovelybunchofcoconuts/hi/challenges/89/entries/4

We would be in our rights to throw up a 404, or we could silently redirect to:

/challenges/89/entries/4

My preference is for the latter, as long as the mangled portion of the URL is truly thrown out (and not, say parsed out of the request object in some method and thus brought back to life).