5 Nov

The first thing that came to my mind was perhaps there is an addon that can do this but I couldn’t find any that can make Firefox auto save password without prompting. After spending nearly two hours researching on how Firefox saves the password, I managed to find a way on how to make Firefox save the login information to the Firefox Saved Passwords manager.
First, I searched some of the important keywords such as “Never for This Site” and “Not Now” on all the files and found that this function is controlled by a few javascript .js files. Then I was more confident in getting this to work since I didn’t have to go through the trouble of downloading the Firefox source code, modify and compile it.
When you submit a form with username and password, it will process the function:
1. _onFormSubmit() in nsLoginManager.js
2. promptToSavePassword in nsLoginManagerPrompter.js
3. _showSaveLoginNotification in nsLoginManagerPrompter.js
4. addLogin in nsLoginManager.js
1. Close Firefox
2. Edit nsLoginManagerPrompter.js with notepad which is normally located in C:\Program Files\Mozilla Firefox\components\
3. Replace the entire line 642 to 711 with the code below:
var pwmgr = this._pwmgr;
pwmgr.addLogin(aLogin);

Now whenever you login to any website, Firefox will auto save the site, username and password to the login manager WITHOUT showing the notification bar. You can access the saved password area by going to Tools > Options > Security and click the Saved Passwords button. There is one possible bug which is even when a user entered the wrong username or password, it will still be saved.
I am calling this a hack instead of customization because it’s not an included feature in Firefox. I had to manually modify one of it’s original core files to make this work. Thinking about this logically, obviously Firefox did not include such feature nor there is an addon for this because they don’t want the world’s favorite browser to turn into a keylogger. Use it with care and think twice before implementing this illegally as it can get you into a lot of trouble!
Technorati Tags: firefox, password, login, notification, save
: Copying this article to your website is strictly NOT allowed. However, if you like this article, you can use the HTML code below to directly link to this article.
Firefox Updated Tab Auto Opens Whenever You Start Firefox Reveal Passwords Hidden Under Asterisks How To Find Hidden Passwords in Firefox Firefox Don’t Remember Yahoo Mail and Hotmail Password Think you can hack? Try2Hack this! Reset or Recover Firefox Master Password Easily Show The Contents of Password Fields
Have computer technical problems? Get FREE help from Raymond.CC FORUM
27 Responses for "Hacking Firefox to Always Auto Save Password Without Showing Notification Bar"
thanks
Now that’s a worthy Tip. Thanks
great
i needed this..
Hey Ray
where to paste the code…i opened nsLoginManagerPrompter.js with notepad
where to paste
pl help..i need this
nice hack ray, thanks for that info
i opened with wordpad..i am able to see and read what u have shown in picture but cannot find 642 line to replace as there is no mentioning of lines
pl help Ray
Nice Bit of Info, Thanks for Sharing Ray..:)
Much useful tip thankyou. Also i wanted to ask that can we suggest you some topics or hacks to find about? Some may be gamming related?
@Gaurav
Ray used Notepad++ to do this, so he could show you the line number…
Nice hack, but now I won’t be very comfy using firefox at cybercafe’s.
Thanks Raymond for this Trick. But i thing this is a very useful feature of Firefox, we should not OFF this. It has allot of benefits.
Specially for me.
Nice tip.
Amazing………. Thanks Ray
While its an interesting tip, I think it will be abused to compromise the security of publicly accessible computers. How about also telling us how to protect ourselves if we want to make sure that some public computer does NOT have our username/password stored.
Raymond, Thanks for sharing with us your knowledge.
I am thinking that maybe you an help me revolve a problem what i have.
Is the following:
Sometimes come to you filmes on dvd without the audio language you want nor the subtitles you would like to read with that filme.
I was trying to add subtitles to a movie on dvd using the VOBEDIT and the IFOEDIT programs but I am not getting good results in the quality of this subtitles, looks loke there is a ‘default’ and the letters always appear on the same format and color, almost impossible to read, I have even tried with the option of ‘copy subtitle colors’ from the original ‘ifo’ and after pasting to the new one but the result is always the same, looks like this have a default and I couldn’t find where to change it.
Thanks for reading this comment.
great work!
love this.. thanks..
thanks ray……..
just hiding such a hack would not make us any less safe
so thanks for sharing this tip
#13, Rob — I was thinking the same thing. I’m no expert, but I’d guess a simple fix is to use portable Firefox on a USB stick.
This should have been better left unknown. No more public computer firefox use for me.
Can you undo the damage by telling us how to easily detect that this has been done?
showSaveLoginNotification : function (aNotifyBox, aLogin) {
Find this in notepad.
#19. Firefox should disseminate a way for system admins to lock down firefox on public computers, so that:
1) Usernames and passwords can be set to never be stored
or to ALWAYS require approval (the opposite of the original post)
and
2) The only way to change this behavior requires an admin password.
and
3) When your password is stored (automatically or otherwise) that fact is prominently displayed on the screen, and you are given an easy method (clickbox) to remove the password.
But this probably won’t happen until some public computers are compromised and after lots of people lose lots of money.
I’ve always felt the default behavior allowing anyone to view stored passwords was a bad design.
Thanks “Ishaan”…i used notepad++ and i was able to do the hack
but still firefox is not saving password
My man! Lately you’ve been on a roll with a BUNCH of very useful tips; easily the most useful that I’ve seen on the net in one place in quite a while.
This one is particularly cool because that box has irritated me for a LONG time. Thanks to you, it’s one less irritation in my life.
Raymond. What seems to be an easier solution is to create bookmark (easly accessible) with following as link:
javascript:(function(){var%20ca,cea,cs,df,dfe,i,j,x,y;function%20n(i,what){return%20i+”%20″+what+((i==1)?”":”s”)}ca=cea=cs=0;df=document.forms;for(i=0;i<df.length;++i){x=df[i];dfe=x.elements;if(x.onsubmit){x.onsubmit="";++cs;}if(x.attributes["autocomplete"]){x.attributes["autocomplete"].value="on";++ca;}for(j=0;j<dfe.length;++j){y=dfe[j];if(y.attributes["autocomplete"]){y.attributes["autocomplete"].value="on";++cea;}}}alert("Removed%20autocomplete=off%20from%20"+n(ca,"form")+"%20and%20from%20"+n(cea,"form%20element")+",%20and%20removed%20onsubmit%20from%20"+n(cs,"form")+".%20After%20you%20type%20your%20password%20and%20submit%20the%20form,%20the%20browser%20will%20offer%20to%20remember%20your%20password.")})();
Now all you have to do is press this right before you want to log in to some page that doesn't allow to save data. Works for me since ages
i’ve tried it and works great with gmail,facebook,friendster to name afew,., failed to save password to msn, yahoo maybe of the security
I was thinking the same thing. I’m no expert, but I’d guess a simple fix is to use portable Firefox on a USB stick…
Leave a reply