Django 密码重置中的电子邮件无效
Invalid email in Django Password Reset
我正在实施 Django 密码重置以在用户使用 django.contrib.auth.urls 键入 his/her 电子邮件 ID 时发送恢复密码 link,效果非常好。
这来自 Django 文档,
If the email address provided does not exist in the system, the user is inactive, or has an unusable password, the user will still be redirected to this view but no email will be sent.
我的问题是,
如果我添加诸如 EmailValidation 之类的东西来检查数据库中是否存在用户输入的电子邮件并引发 ValidationError,这会是一个安全问题吗?
很明显,因为它会允许黑客运行 蛮力猜测电子邮件。并且如果用户的密码强度不够强,他可能会使用暴力破解或猜测来强制登录(如果没有其他安全方法)。我建议在重置页面上也放一个 captcha,以防止机器人进入重置密码页面。
我正在实施 Django 密码重置以在用户使用 django.contrib.auth.urls 键入 his/her 电子邮件 ID 时发送恢复密码 link,效果非常好。
这来自 Django 文档,
If the email address provided does not exist in the system, the user is inactive, or has an unusable password, the user will still be redirected to this view but no email will be sent.
我的问题是,
如果我添加诸如 EmailValidation 之类的东西来检查数据库中是否存在用户输入的电子邮件并引发 ValidationError,这会是一个安全问题吗?
很明显,因为它会允许黑客运行 蛮力猜测电子邮件。并且如果用户的密码强度不够强,他可能会使用暴力破解或猜测来强制登录(如果没有其他安全方法)。我建议在重置页面上也放一个 captcha,以防止机器人进入重置密码页面。