Skip to content

Random thread id #381

Answered by cmgmyr
omidMolaverdi asked this question in Q&A
Feb 5, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @omidMolaverdi, I would not mess around with the auto-incrementing id. If you're looking to obfuscate the IDs used in the URL, I'd add a UUID column to the threads table/model, and probably to the messages and participants too. Then you want to use these new UUIDs for the URLs. This will completely hide the auto-incrementing ids from the users and make it extremely hard to guess.

You'll also want to write your own authorization code to make sure the current user can view a message. For example, if the user isn't in the thread participants, then you want to redirect them somewhere else or show an error.

These two options are not in the package to be more flexible and it's mostly up to t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@omidMolaverdi
Comment options

Answer selected by cmgmyr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants