Blog

Keychain Nightmare

Nov 9, 2008

On Mac OS X 10.5.1 (Leopard) they keychain is great! A central place to store all passwords...

When browsing in Safari, the keychain remembers passwords and pre fills the username and password fields next time you are asked for them, making remembering passwords and logging in to sites easy.

There are two type of passwords the Keycahin can remember for Safari; web form passwords (appear as a form inside a web page) and internet password (apper as the standard server authentication popup window).

This works great until a site that requires both.

This doesn't usually happen on many web sites, but as a web site developer, I often work on sites that are completely password protected (internet password) until they are complete but also require you to log in to access certain features (web form password)

The Problem

Web form passwords seem to overwrite internet passwords, and visa versa.

If I enter a username and password to access the site (eg. username: test password: pass) this all works well and is remembered fine.

Next time I reopen the browser and revisit the site I am logged in automatically.

If, however, once logged it, I need to enter a user/pass into a form (eg. username: myuser password:mypass) and tell Safari to remember it, it seems to work, until next time I visit the site, at which point I get prompted to log in but the username field is pre filled with 'myuser' rather than 'test'. If i correct this and save it, when I reach the web form these details are now in there, rather than he correct ones.

Watching the passwords inside the keychain application, you can see it creates the initial entry correctly, but then modifies it rather than creating a new entry for the other type of password.

Working Behavior

Safari should remember these passwords separately, I can confirm this is how it works on another computer. I even imported a keychain from a working computer with both passwords set, this worked find initially, but then got mashed up as soon as I had logged in.

Possible Cause

I did have safari stand and SIMBL installed, I removed these incase they were the cause of the problem, this did not help. Could they have broken something permanently. Other than that this is quite a fresh install (archive and install from 10.3) with no other modifications.

Attempted Fixes

None of this made any difference. Not to say that it wouldn't in other similar circumstances.

  • Repair keychain
  • New keychain
  • Remove Safari Stand
  • Reinstall Safari
  • Reinstall OS X 10.5.1 Combo Updater

I am waiting to see if OS X 10.5.2 will fix the problem... If not, maybe an OS reinstall will help, not usually the preferred solution on a Mac.

--- EDIT ---

10.5.2 didnt help :(

I have given up and am now using firefox!


Comments