Repository navigation
fix(dotenv-quote): normalize vertical tab and form feed control characters - #5128
Closed
vaibhavsrv wants to merge 1 commit into
Closed
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
Collaborator
|
Thanks for this contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters
ods/lib/dotenv-quote.shserializes values for single-line.envfiles shared by Bash, Docker Compose, and ODS's safe environment parser. It normalizes carriage returns (\r) and newlines (\n) to spaces to maintain single-line assignments.However, non-printable vertical whitespace characters—specifically form feeds (
\f/ ASCII 12) and vertical tabs (\v/ ASCII 11)—were previously preserved unescaped. When present in model descriptions, raw JSON tokens, or configuration payloads, these characters break strict POSIX dotenv parsers and cause formatting issues across tools.Normalizing
\fand\vto spaces alongside\rand\nguarantees portable, single-line variable serialization across all shells and container runtimes.Overlap check
Searched live open/closed PRs by
dotenv-quote,dotenv, andlib/dotenv-quote.sh. #3820 merged double-quote serialization for single quotes, and #3712 normalized CRLF endings. None covers non-printable vertical whitespace (\fand\v). This change directly extends the existing whitespace normalization filter indotenv_quote.Validation
$'form\ffeed'and$'vertical\vtab'toods/tests/test-dotenv-serializer.sh.bash ods/tests/test-dotenv-serializer.sh: All 30 test scenarios pass round-trip verification across both Bash source and safe-env parsing.ods/lib/dotenv-quote.sh.Review status and composition
Independent human review welcome. Change is 2 lines in
ods/lib/dotenv-quote.shand 4 lines inods/tests/test-dotenv-serializer.sh. Composes cleanly on upstreampublic-betaHEAD33155fb5.