In Response to Sunbelt’s Saving Login Details in Firefox Without Notification

Posted: March 3rd, 2011 | Author: | Filed under: IT Related | Tags: , , , | No Comments »

Morning.. 🙂

If you have come across Sunbelt’s blog post today on “Saving login details in Firefox without notification“, where password can be force to be saved to the Firefox (password manager) without any notification to the user. Yeah, its bad. But whats the autocomplete=”off” on the form? 🙂

Here is my solution for that (sorry if I made things worse)

1) Open up nsLoginManager.js in the following directory (depending on your operating system)

  • Mac OS : /Applications/Firefox.app/Contents/MacOS/components/
  • Linux (in my case, Ubuntu) : /usr/lib/firefox-3.6.14/components/nsLoginManager.js  # <= where 3.6.14 is your Firefox version
  • Windows : C:\Program Files\Mozilla Firefox\components\

2) Look for this function : “_isAutocompleteDisabled : function (element)” and comment out the function body from the following code

  _isAutocompleteDisabled : function (element) {
    if (element && element.hasAttribute("autocomplete") &&
        element.getAttribute("autocomplete").toLowerCase() == "off")
        return true;
    return false;
  },

into something like this:

  _isAutocompleteDisabled : function (element) {
    // if (element && element.hasAttribute("autocomplete") &&
    //     element.getAttribute("autocomplete").toLowerCase() == "off")
    //     return true;
    return false;
  },

3) Restart your Firefox and wallaaa! 🙂

P/S: you can simply uncomment the lines to revert but remember that if you want to clear the saved password, you can do it from the Password Manager (Preferences > Security > Saved Passwords > Remove All)



Leave a Reply