Closed Bug 1792329 Opened 3 years ago Closed 3 years ago

Firefox won't import login files if signon.management.page.fileImport.enabled is set to true

Categories

(Toolkit :: Password Manager, defect)

Firefox 105
x86_64
All
defect

Tracking

()

RESOLVED DUPLICATE of bug 1781213
Tracking Status
firefox105 --- affected
firefox106 --- affected
firefox107 --- affected

People

(Reporter: newproplus, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

I have turned on "signon.management.page.fileImport.enabled",when I import password from a file,an error will be caused

Actual results:

The error in console is:

Uncaught TypeError: this._errorMessages[errorType] is undefined
show chrome://browser/content/aboutlogins/components/import-error-dialog.mjs:52
<anonymous> chrome://browser/content/aboutlogins/aboutLogins.mjs:72
import-error-dialog.mjs:52:36
show chrome://browser/content/aboutlogins/components/import-error-dialog.mjs:52
<anonymous> chrome://browser/content/aboutlogins/aboutLogins.mjs:72
sendToContent resource:///actors/AboutLoginsChild.jsm:320
#passMessageDataToContent resource:///actors/AboutLoginsChild.jsm:311
receiveMessage resource:///actors/AboutLoginsChild.jsm:280

Expected results:

import password correctly

The Bugbug bot thinks this bug should belong to the 'Toolkit::Password Manager' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Password Manager
Product: Firefox → Toolkit

Janika, can you please investigate if we can have an error message that we are not supporting?

Flags: needinfo?(jneuberger)

Hello, thank you for the bug report!
I couldn't get the same errors in the Browser Console as the reporter but if signon.management.page.fileImport.enabled is set to true, Firefox is unable to import a Chrome Passwords.csv file from Chrome nor a logins.csv file saved from Firefox.

Browser console errrors:

eval() and eval-like uses are not allowed in the Parent Process or in System Contexts (Blocked usage in “chrome://global/content/third_party/d3/d3.js”)
call to Function() blocked by CSP d3.js:2040
parse chrome://global/content/third_party/d3/d3.js:2040
parseRows chrome://global/content/third_party/d3/d3.js:2088
parse chrome://global/content/third_party/d3/d3.js:2038
importFromCSV resource://gre/modules/LoginCSVImport.jsm:160
InterpretGeneratorResume self-hosted:1819
AsyncFunctionNext self-hosted:807

Reproduced on macOS 12, Windows 10, Ubuntu 22, on Firefox 105.0, 106.0b9, 107.0a1.
Setting as NEW so that developers can have a look at it.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → x86_64
Summary: Is it a bug when I import password from a file? → Firefox won't import login files if signon.management.page.fileImport.enabled is set to true

I think this is a duplicate of bug 1781213.

Marking as RESOLVED DUPLICATE based on Comment 4.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

@newproplus Thank you for filing a bug about this!

Yes, the root cause is that the use of eval() or eval-like functions is blocked in the parent process.
Currently the d3.js library that we use to parse the CSV file executes an eval function and we are not catching the exception thrown by the eval blocking restriction. We are working on removing the eval dependency in the import process to fix this issue.

@Tom Yes, it's a duplicate of Bug 1781213.

Flags: needinfo?(jneuberger)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: