Firefox Saved Passwords Gotcha

Posted At : September 30, 2004 3:02 PM | Posted By : Cameron
Related Categories: Misc,Technology,Standards

Today I came across a gotcha with the way Firefox saves username and password information for login forms. This may also be a problem with IE and other browsers/toolbar/add ons, but I've never used this feature in anything but Firefox.

Here's the situation: Firefox saves username/password combinations per domain, not per individual page. This means that it will attempt to use the same username and password on a member login (/members/login.cfm) and an admin console (/admin/login.cfm). That's not really a big deal because it doesn't really create a security concern, and if you have different logins for the two forms, you just end up re-typing things.

Here's the problem: Say you are editing a user's account in the admin section of your website/intranet/application. If the field names match the names in your login form (ie: username/password), then firefox will OVERWRITE the value specified in the value="" attribute of the INPUT tag and will insert your saved login information instead. That's right, it overwrites any values you've programatically populated the form with

If you aren't paying close attention when you edit a user, it's very easy to submit the form with the newly inserted login info in it. Granted, there should be some biz logic that prevents the form submission from being successful, but I'll bet there are plenty of systems out there today without this vital bit of logic. If you suddenly find that 10 accounts in your application share the same username and password, this could very well be the reason.

The solution: This is probably a good idea either way, but the solution I've used is to make sure that your login forms have distinct and different field names than your administration tool's user profile edit forms. A quick solution to a very odd problem.

Comments
Cameron Childress's Gravatar UPDATE: Looks like this behavior was reported as a bug way back on 11/27/2001, and that it will not be changed.

https://bugzilla.mozilla.org/show_bug.cgi?id=11226...

As Firefox becomes more frequently used, this will become a greater issue...
# Posted By Cameron Childress | 9/30/04 3:33 PM
Robert's Gravatar Please stop flip flopping.
# Posted By Robert | 9/30/04 8:08 PM
Cameron Childress's Gravatar A man has to have shoes!
# Posted By Cameron Childress | 10/1/04 7:51 AM
Rob Lang's Gravatar This is a problem with the popular forum software phpBB, I have been caught out many times!
# Posted By Rob Lang | 5/24/06 2:19 AM

Recent Entries

Archives By Subject

Tech Blogs

(Mostly) Not Tech Blogs