Wednesday, January 18, 2017

FireFox and save passwords, always

First thing first is to install the addon of Saved Password Editor, then most of the web sites will allow you to save passwords, automatically or manually:


But some web developers figured out a trick to confuse FireFox by adding fake "user" and/or "password" input fields around the real one(s). Such fake input fields can be revealed by Inspect Element, like these four fake inputs below the real one:

These four fake input fields must be removed for password-save to work. We need to install Greasemonkey, then add the following user script:

// ==UserScript==
// @name        Enable Password Saving
// @include     https://the_web_site
// @grant       GM_getValue
// ==/UserScript==

var oldInput = document.querySelector ("input[value=no-ff-pwmgr-1]");
oldInput.parentNode.removeChild(oldInput);
oldInput = document.querySelector ("input[value=no-ff-pwmgr-2]");
oldInput.parentNode.removeChild(oldInput);
oldInput = document.querySelector ("input[value=no-ff-pwmgr-3]");
oldInput.parentNode.removeChild(oldInput);
oldInput = document.querySelector ("input[value=no-ff-pwmgr-4]");
oldInput.parentNode.removeChild(oldInput);


Now refresh the page, the four fake input fields are removed:


Log in again and FireFox will prompt us to save the password.

No comments:

Post a Comment