#722978 nss-passwords: Uses wrong profile directory sometimes

Package:
nss-passwords
Source:
nss-passwords
Description:
read passwords from a Mozilla keyring
Submitter:
Neil Mayhew
Date:
2022-01-01 09:06:06 UTC
Severity:
normal
Tags:
#722978#5
Date:
2013-09-15 01:23:42 UTC
From:
To:
I have multiple iceweasel profiles, and some don't have .default at the end of the
name. The actual default profile has Default=1 in profile.ini but it
doesn't end in .default

nss-passwords uses a naive algorithm that just looks for any directory
with a name that ends in .default. On my system, it gives:

Fatal error: exception Assert_failure("main.ml", 166, 2)

because it's picking the wrong profile (one that doesn't have a
signons.sqlite yet).

nss-passwords should read ~/.mozilla/firefox/profiles.ini, pick the one
that has Default=1, and use the value of Path and IsRelative to find
it. This will also handle the case when the profile directory isn't
actually in ~/.mozilla/firefox/ (eg when shared between OSs on a
dual-boot system).

This problem can be worked around using the -d option, but the program
is supposed to be able to figure out the correct directory by itself.

Overall, this is a very useful program, however.