[Bug]: CSV Import can corrupt the database by saving invalid entries #1811
Labels
bug
Something isn't working
needs info
We need more information from the OP before continuing
transaction import
Related to manually importing transactions
Verified issue does not already exist?
What happened?
Originally impacted a user on fly.io, discord support thread here
Importing a CSV with an invalid (huge?) number, corrupts the database, and makes actual fail to load subsequently.
Reproduce by importing the following as a CSV:
Result:
"Fatal Erro" app fails to load permanantly.
Notes:
The parsing logic strips out evertything that isn't a digit with regex and has its own implementation of safeNumber?
https://github.com/actualbudget/actual/blob/master/packages/loot-core/src/shared/util.ts#L327-L353
The CSV Parser should possibly also validate that each row has the same number of columns, as the CSV had comma's in the content body.
What error did you receive?
Where are you hosting Actual?
Fly.io
What browsers are you seeing the problem on?
Firefox
Operating System
Windows 11
The text was updated successfully, but these errors were encountered: