Prevent user to find password through Firebug/Chrome Dev Tools

后端 未结 13 1189
醉梦人生
醉梦人生 2020-12-30 22:28

\"Hidden

For the passport input field:



        
13条回答
  •  渐次进展
    2020-12-30 23:08

    You can't, and you shouldn't. This is not a security issue you should be tackling on your website. It's up to the user to keep their passwords safe. If I have the ability to use the dev console or otherwise inject javascript on your page, no matter what you do the user's passwords will still be compromised.

    If a user chooses to save their passwords in their browser, then it's up to them to prevent them from falling into wrong hands, and there's absolutely nothing you can do about it on your site. In fact, if you're using Chrome and have passwords saved, navigate to chrome://settings/passwords and click on some password fields.

    Other answers talk about hashing passwords etc. That's something you should definitely do, but on your server. You could of course hash or encrypt a password before sending it to your server (and you really should too, using https), but that's a completely different issue.

提交回复
热议问题