wldrumstcs
08-14-2009, 05:46 PM
When trying to figure out a way to prevent this (which is mainly a problem automated scripts trying to register on your site), I came up with a solution that (I think) is okay. Before, when you registered on my site, you were put into a MySQL DB, but your "active" value was set to 0. In an email, there was an activation link that, when clicked, it changed your "active" value to 1 and allowed you to log in. Obviously, such a system does not prevent someone from running a script and creating a bunch of inactive users in my DB.
Do you folks think it's safe/sound to NOT put the person into the DB until after they click the link? I was thinking of creating a link that said www.mysite.com/activate.php?username=$_POST[username]&password=md5($_POST[password])
I would then have a "Verify your password" box that hashes the user's input and compares it to the $_GET[password]. If it matches, then create the account.
I'm not sure if this is the way most people already do it... but I wanted to run this by you folks and see if there are any big flaws with this design.
Thanks!
Do you folks think it's safe/sound to NOT put the person into the DB until after they click the link? I was thinking of creating a link that said www.mysite.com/activate.php?username=$_POST[username]&password=md5($_POST[password])
I would then have a "Verify your password" box that hashes the user's input and compares it to the $_GET[password]. If it matches, then create the account.
I'm not sure if this is the way most people already do it... but I wanted to run this by you folks and see if there are any big flaws with this design.
Thanks!