"Bad password" error when connecting to a password protected server

I have the same problem and I think I found why:

How to reproduce:

  1. Issue a steam url: Steam://connect/ip/password.
  2. Wait for CS to start and then connect.
  3. Close down CS.
  4. On your server: Change the password
  5. Issue a steam url: Steam://connect/ip/new_password.
  6. "SteamUrlHandler" now starts CS and then issues the connect command.
  7. You get BadPassword response from server.

Question Why?

I used a protocol analysator and detected that it uses the old password during the 2nd connect. So the "SteamUrlHandler" has older passwords cached and sends that to the game.

Workaround?

Still looking after a good workaround, but issuing the steam-url again after a while seems to work.