Random thread id #381
-
Hi and thanks for the fantastic work. I have the questions below:
Thanks very much. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@cmgmyr can you kindly contribute to this please? |
Beta Was this translation helpful? Give feedback.
-
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 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 the end developer to implement authorization. |
Beta Was this translation helpful? Give feedback.
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 themessages
andparticipants
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…