Skip to content

Reject extra CSV records in StringToString arguments - #521

Open
Harshil-1603 wants to merge 2 commits into
spf13:masterfrom
Harshil-1603:fix/string-map-records
Open

Harshil-1603 wants to merge 2 commits into
spf13:masterfrom
Harshil-1603:fix/string-map-records

Conversation

@Harshil-1603

Copy link
Copy Markdown

When a map argument contains multiple equals signs, it is parsed as CSV. The parser currently reads only the first record, so an unquoted newline can silently discard later key/value pairs. Reject additional CSV records before updating the flag, while preserving newlines inside correctly quoted fields. Explain this quoting rule in the flag documentation.

Refs #297.

Validation: the full race-enabled test suite, vet, configured golangci-lint and formatting passed. The new regression failed before the fix; a quoted embedded newline remains accepted, and rejected input leaves the default value and Changed state intact.

AI assistance: OpenAI Codex, gpt-6.1-sol.

@CLAassistant

CLAassistant commented Oct 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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