0
  • 我已经添加了 autocomplete="off" 并且我尝试了 autocomplete="new-password" 到密码 texfield

<input type="password" name="login[password]" id="login_password" placeholder="Password" data-validate="not-empty" data-validate-error-message-position="below">
  • 已经保存的密码自动完成功能将出现在 chrome 和 firefox 中,如果我在输入字段中使用 autocomplete="off" 或 autocomplete="new-password" 则不应该出现。我需要解决此漏洞的解决方案。您的帮助将不胜感激。
4

2 回答 2

0

我们最近遇到了这个问题,为了克服这个问题,我们做了一些技巧将在下面解释,

问题,

我们在登录时遇到了保存密码模式的问题(成功后),注意我们没有在里面使用

解决方案

  1. 我们将此<input type="password" autoComplete="off" autoCorrect="off" />作为其
  2. 使用 CSS,我们将应用密码类型(点)行为

屏蔽文本并显示密码类型点

    font-family: "text-security-disc";   
    text-security: disc;  
    -webkit-text-security: disc !important;  
    -mox-text-security: disc;
  1. 在提交之前(进行ajax调用之前提交的第一步)我们将输入的类型更改为“文本”,这样浏览器就不会理解并且不会提示用户。同样,当您使用 CSS 映射密码时,即使您更改类型,您也无法在 UI 中看到。
于 2019-08-30T10:59:20.493 回答
0

现在大多数主流浏览器都忽略了 autocomplete=off。

有关更多信息,请查看

您可以添加隐藏输入具有类型密码

  <input type="text" style="display:none">
  <input type="password" style="display:none">
于 2019-08-30T10:38:08.993 回答