security - How to deal with an attack on registration-form? -


question on registration process

i thinking email verification, , playing app. if

-) attacker write script register millions account different random email address(all existing, people's email)then when people register, prompt email exists in db?

-) or simpler, if user register else's email address? registration ajax triggers creation of userid , info user table in db, verification not done.

but then, when "real" user email register, email taken...?as there can not 2 email address exist in db @ same time(as script won't able distinguish between users....

first, should try detect if same ip sends multiple registration requests during short period of time , blacklist (at least while).

second, when verification-email sent - can many things avoid "duplicate registration" problem, here few examples:

  1. run cleanup job once day - deleting entries of users didn't verify account (via email) more 24 hours
  2. do not create user account until user verified his/her registration (you can create entry in table: unverified_users instance). doing - make sure reduce latencies existing users when such attach occurs - since users table not modified.
  3. if user tried register , he/she "has account" should allow user reset password sending verification-email link it.
  4. you can use solutions captcha in registration form - prevent such attacks. today there smart bots can by-pass captcha, can captcha-alternatives

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -