ASP.NET 会员密码?
如果我要求密码长度在 7 到 16 个字符之间且至少包含 1 个数字密码,然后发送不包含数字字符、% 符号和 ^ 符号的临时密码,密码会失败吗?
If I require a password to be between 7 and 16 characters and contain at least 1 numeric password and then send a temporary password that contains no numeric characters and % signs and the ^ sign, will the password fail?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你会没事的。 它仅在您更改时检查复杂性。
You'll be fine. It only checks the complexity when you change it.
我不这么认为。 仅当创建或更改密码时才应检查密码复杂性要求。
I do not believe so. The check for password complexity requirements should only occur when the password is created or changed.
IIRC,临时密码将遵循您建立的规则。 我将使用 MembershipUser 方法:ResetPassword 为用户创建所有临时密码。
IIRC, the temporary password will follow the rules that you have establish. I would use the MembershipUser method: ResetPassword, to create all temporary passwords for the users.
我建议创建所有临时密码以符合密码复杂性规则。
但是,这些规则仅在更改密码时强制执行,而不是在您登录时强制执行。
不应使用百分号,以防它被误解为转义的十六进制。
I suggest creating all temporary passwords to match the password complexity rules.
However the rules are only enforced when the password is changed, not when you log in.
The percent symbol shouldn't be used just in case it's misinterpreted as escaped hex.