简体   繁体   English

email 验证表 php

[英]email verification form php

I have a web page registration form which asks for the person's email address plus some other info.我有一个 web 页面注册表,要求提供此人的 email 地址以及一些其他信息。 When the page is submitted the programs checks if that email address is already in the database.当页面被提交时,程序会检查 email 地址是否已经在数据库中。 If it is not the info is added to the database and an email is sent to the registered email address with a link which which is then used to verify the person's email. If the email is already present in the database the registration is prevented.如果不是,则将信息添加到数据库中,并将 email 发送到已注册的 email 地址,其中包含一个链接,然后用于验证此人的 email。如果 email 已存在于数据库中,则注册将被阻止。

How do I deal with a malicious entry if the email entered does not belong to the person entering the form but belongs to another potential registrant?如果填写的email不属于填表人,属于其他潜在注册人,如何处理恶意填报? True a verification email will be sent but it might be ignored since the recipient did not register in my website确实会发送验证 email 但可能会被忽略,因为收件人没有在我的网站上注册

Could use some ideas Thanks可以使用一些想法谢谢

I am not sure how to proceed to prevent a malicious entry我不确定如何继续防止恶意进入

You've basically already dealt with it.你基本上已经处理过了。 The validation email is the way you stop someone registering with another person's email address, because - unless they've gained unauthorised access to that mailbox - they can't ever verify the account and complete the registration.验证 email 是阻止某人使用另一个人的 email 地址注册的方式,因为 - 除非他们获得对该邮箱的未授权访问 - 他们永远无法验证帐户并完成注册。

The only problem I can think of with your description is what happens if someone tries to register with an email they cannot verify, and then later the legitimate owner comes along and enters that email again.根据您的描述,我能想到的唯一问题是,如果有人尝试使用他们无法验证的 email 进行注册,然后合法所有者出现并再次输入该 email,会发生什么情况。

There are probably a couple of solutions:可能有几个解决方案:

  1. At registration, if someone tries to register with an existing but unvalidated email,simply re-send the validation mail again as if nothing had happened.在注册时,如果有人尝试使用现有但未验证的 email 进行注册,只需再次重新发送验证邮件,就好像什么也没发生一样。

And / or和/或

  1. Set an expiry time so that if an account is not verified within a set amount of time, you automatically delete that record from the database.设置一个到期时间,这样如果一个帐户在设定的时间内没有被验证,你会自动从数据库中删除该记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM