Skip to content

fix: encode DEL (0x7f) control character#17

Merged
ChrisHines merged 2 commits into
go-logfmt:mainfrom
spaceone:fix/escape-del-char
Sep 25, 2025
Merged

fix: encode DEL (0x7f) control character#17
ChrisHines merged 2 commits into
go-logfmt:mainfrom
spaceone:fix/escape-del-char

Conversation

@spaceone

@spaceone spaceone commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

\x7f"\u007f"

@ChrisHines

Copy link
Copy Markdown
Member

Thanks.

@ChrisHines ChrisHines merged commit 3f5ba89 into go-logfmt:main Sep 25, 2025
@ChrisHines

Copy link
Copy Markdown
Member

I'll probably tag a new release soon to get this published.

@ChrisHines

Copy link
Copy Markdown
Member

@spaceone It looks like I approved and merged this too quickly. GitHub had deactivated the CI workflows because the repo hasn't had any changes recently.

After re-enabling them there is a test failure. See: https://github.com/go-logfmt/logfmt/actions/runs/18050577904/job/51371519322

It looks like the extra rune value landed in the wrong function. It should be in needsQuotedValueRune instead of keyRuneFilter. Do you want to make a follow up PR to fix that?

@spaceone

Copy link
Copy Markdown
Contributor Author

if you enable the CI workflows again, yes. I don't know how to test/execute this all.

spaceone added a commit to spaceone/logfmt that referenced this pull request Sep 27, 2025
spaceone added a commit to spaceone/logfmt that referenced this pull request Sep 27, 2025
@ChrisHines

Copy link
Copy Markdown
Member

You can test locally by running go test. I have enabled the CI workflows also.

@spaceone

Copy link
Copy Markdown
Contributor Author

→ tests pass with #18

spaceone added a commit to spaceone/logfmt that referenced this pull request Sep 28, 2025
spaceone added a commit to spaceone/logfmt that referenced this pull request Sep 29, 2025
encode DEL control characters in values, and remove them from keys.

Fixes: 3f5ba89
ChrisHines pushed a commit that referenced this pull request Oct 3, 2025
encode DEL control characters in values, and remove them from keys.

Fixes: 3f5ba89
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