Reputation: 3964
For changing password or to verify the user after signup how do I generate the link how can I encode the URL for username. I don't want it simple because this could be a vulnerability of changing another user like this http://testsite.com/changepassword/user=username. Then anybody can edit user as another username. What is the proper way to do it and expire link after one time visit.
Upvotes: 2
Views: 206
Reputation: 26
Why don't you generate a random (long) id that would refer to the user, with a limited validity ? You could store this info in the user table or in another table that would be linked to user table. After the visit, you remove the id from the table. Nikaya
Upvotes: 1