3 ms·
The first example is just that. Put the id in the URL and make the slug optional. Stackoverflow makes the slug completely optional but you have the choice of o
by msoad 2y ago
The first example is just that. Put the id in the URL and make the slug optional.
Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example
- Traubenfuchs 2y ago> https://stackoverflow.com/questions/78870603/i-LOVE-genocide https://stackoverflow.com/questions/78870603/i-LOVE-genocide This is bad.
- christina97 2y agoNo you redirect to the right place. It’s no worse than writing obscene things in a URL fragment (after #) that doesn’t even get sent to the server.
- hmry 2y agoWhat is the actual harm in allowing people to put random text at the end of the url? Not to mention something similar can be done to any url, e.g. #whatever-you-want or ?_=whatever-you-want
- alpinisme 2y agoIt’s not great but it matters less when the content you get going to that page is so unremarkable. Don’t forget you can do that to any url, even of sites that don’t use optional slugs, if your goal is just vague, evil-by-link-appearance.
- layer8 2y agoThis is not materially different from https://stackoverflow.com/questions/78870603#i-LOVE-genocide https://stackoverflow.com/questions/78870603#i-LOVE-genocide or https://stackoverflow.com/questions/78870603?i-LOVE-genocide https://stackoverflow.com/questions/78870603?i-LOVE-genocide.