Passwords saved in Windows profile do not load when copied to Linux
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
People
(Reporter: faxxx720, Assigned: faxxx720)
References
Details
Attachments
(2 files, 1 obsolete file)
553 bytes,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Steps to reproduce:
- Copied %appdata%\Mozilla\Firefox\Profiles\XXXX.profile to ~/.mozilla/firefox
- Updated profiles.ini to match new profile
- Opened Firefox 67.0.4+build1-0ubuntu0.18.04.1 with copied profile
Actual results:
Found that all saved passwords and usernames were gone, both from the website and Preferences > Saved Logins.
Expected results:
Passwords should have been preserved.
Assignee | ||
Comment 1•6 years ago
|
||
I have debugged this problem and found that in nss/lib/util/utilmod.c, line 415, inside of nssutil_ReadSecmodDB, when reading the pkcs11.txt file, the code assumes only '\n' will be a line separator, but Windows versions of Firefox create this file with '\r\n' line endings.
I fixed the code so that on non-Windows platforms (tested on Windows Subsystem, Ubuntu 18.04), the file is checked for '\r\n' and '\n', and both are appropriately handled & attached a patch.
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Hello J.C.! Thanks for your input! The reason I put in the Windows #ifdef was because the current Windows release of Firefox, 67.0.4 and also the Development edition, 69.0.b2 already handles both '\r\n' and '\n', so I thought to just avoid modifying any behavior on Windows.
Comment 5•6 years ago
|
||
Hi Frank,
Thanks for this report and the patch suggestion.
Looks that some other bugs will be direct or indirectly benefited with this patch too.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1453372
- https://bugzilla.mozilla.org/show_bug.cgi?id=1558025
- https://bugzilla.mozilla.org/show_bug.cgi?id=1541284
- https://bugzilla.mozilla.org/show_bug.cgi?id=1505038
I am just commenting you patch now. Could you improve it when I try to find a way to automate the tests?
Thanks,
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Sadly, this will take me a bit longer to get a Windows dev environment working to test the Windows file reading semantics -- I was using WSL previously (to avoid dealing with updating to vs2019).
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Marcus,
I've updated the patch to not use an ifdef, and uploaded to phabricator.
However, I wasn't able to properly build tests for a release build for Windows -- while I can build the libraries both Debug and Release, there's a 100% CPU usage on one core from cl.exe when trying to do "LINK_EMBED: .../dist/Release/bin\addbuiltin.exe", which doesn't seem to end. This build is with nss and nspr at the tip of the hg default branch at the time I wrote this commit. This happened even if I did not include my patch.
Thanks
Frank
Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•5 years ago
|
||
Hi Frank,
I tested your patch here and looks good.
I am analysing a way to test this change here and than we can validate.
Thanks,
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Description
•