3 ms·
> Database ids on the URL are also a security concern. More so than in mark up? If so why? Should surrogate keys never be exposed to users in any form? Then w
by paulryanrogers 8y ago
> Database ids on the URL are also a security concern.
More so than in mark up? If so why?
Should surrogate keys never be exposed to users in any form? Then what's the alternative? Nonces for everything, all the time?
- luckylion 8y ago> More so than in mark up? If so why? Easy to enumerate, if that's a concern.
- dqybh 8y agoIn the case of URLs, you can have /questions/:id/:slug, and then load the question by :id, but if :slug doesn't match the slug you've got in the database, then return 404.
- luckylion 8y agoSure, but that means that you have a unique key combination of id + slug for all intents and purposes. The argument for having the ID is that the slug can change and you can redirect. If you don't redirect, that argument falls flat, and if you redirect you're easier to enumerate.