Skip to content

Refactor CSV Import command - #2381

Open
sbreker wants to merge 2 commits into
qa/2.xfrom
dev/refactor-csv-import-command
Open

Refactor CSV Import command#2381
sbreker wants to merge 2 commits into
qa/2.xfrom
dev/refactor-csv-import-command

Conversation

@sbreker

@sbreker sbreker commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

Comment thread lib/QubitCsvImport.class.php Outdated
$commandUpdate = ('match-and-update' == $this->updateType) ? '--update="match-and-update"' : '--update="delete-and-replace"';
$commandSkipUnmatched = ($this->skipUnmatched) ? '--skip-unmatched' : '';
$commandLimit = ('' !== $this->limit) ? "--limit=\"{$this->limit}\"" : '';
$commandLimit = ('' !== $this->limit) ? sprintf('--limit=%s', $this->limit) : '';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need these string arguments to be in quotes?

@sbreker sbreker Jul 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I missed adding escapeshellargs() here which returns a quoted string. See latest commit which addresses this.

@sbreker
sbreker force-pushed the dev/refactor-csv-import-command branch from 1be66b9 to 337a412 Compare July 16, 2026 22:18
@sbreker
sbreker force-pushed the dev/refactor-csv-import-command branch from 337a412 to d8a33b6 Compare July 16, 2026 22:20
@sbreker
sbreker requested a review from anvit July 20, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants