Should I be obfuscating database IDs from my users?

后端 未结 1 1953
慢半拍i
慢半拍i 2021-02-11 17:42

I\'m being told that I shouldn\'t be using database IDs directly in HTML code in web applications.

Currently I use the IDs on things like table row IDs (tableRow-454 whe

相关标签:
1条回答
  • 2021-02-11 18:16

    No, you're just making extra work for yourself.

    As long as you're doing enough testing that changing an ID here or there won't give the users access to something they shouldn't then you're fine having the IDs visible.

    In some situations it can be beneficial to hide them or have non-sequential numbers, or maybe not starting counting from zero. For example if someone got order number 3 they might start asking questions...

    0 讨论(0)
提交回复
热议问题