Skip to content

bug: CSV Data Corruption #23

@akramcodez

Description

@akramcodez

Description

The custom parseCSVLine logic incorrectly toggles the inQuotes state without handling quotes or escaped characters. Inputs like "foo""bar" are parsed incorrectly.

// Input
'"foo""bar",baz'

// Output
['foobar', 'baz']

// Expected
['foo"bar', 'baz']

Impact

  • Silent data corruption for fields containing quotes
  • Downstream analysis failures with standard CSVs
  • Loss of data integrity in exported reports

Potential Fix

Rewrite the parser to handle escaped quotes ("") or replace it with a standard library like csv-parse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions