Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox: What's the basis for remembering login information?

Tags:

Updated with clarifications

Hello,

When our users go to http://mysubdomain.server.com/login they get redirected to https://secure.server.com/login?subdomain=mysubdomain. So the actual login page is located on the secure.server.com subdomain.

The problem is that if the user logs in with the credentials meant for subdomainA and tells Firefox to remember the password, the browser will autocomplete the login form even if the user visits the login page meaning to log into subdomainB.

Firefox assumes that the login form on secure.server.com/login?subdomain=subdomainA is the same with the one on secure.server.com/login?subdomain=subdomainB.

At first, I thought Firefox remembers passwords based on a combination of the URL and the name attribute of the form, but I've tried changing the name based on the subdomain (name="login-<subdomain_name>"), and it still doesn't work.

How can I make Firefox remember passwords for subdomainA and for subdomainB separately, and not together?

like image 420
Dan Burzo Avatar asked Feb 02 '10 12:02

Dan Burzo


2 Answers

I couldn't quite decipher what your setup is, but you can enable login manager debugging and check what Firefox does. You can also inspect signons.sqlite in your profile to see what pieces of data are stored with the login.

I thought that for web forms it keyed off the form's submit URL, but my memory is shady on this.

[edit] source (nsLoginManager.js) says it only uses the form's action and the page's URL, and it uses not the action/page URL itself, but (see _getPasswordOrigin) the scheme+host+port combination.

like image 76
Nickolay Avatar answered Nov 08 '22 12:11

Nickolay


If they're actually entering data into http just to be redirected to https after login, isn't that a bad scenario? You're already sending the most sensitive piece of data unencrypted across the wire.

I believe a better solution would be to redirect them to the https site and do login there...is there something I'm missing with your setup? Do they login again on the secure site?

like image 21
Nick Craver Avatar answered Nov 08 '22 12:11

Nick Craver