Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caddyfile: Fix heredoc fuzz crasher, drop trailing newline #5404

Merged
merged 3 commits into from
Feb 26, 2023

Conversation

francislavoie
Copy link
Member

@francislavoie francislavoie commented Feb 26, 2023

I was mixing string and []rune and that broke on multi-byte runes and such. Whoops.

Followup to #5385, Closes #5400

I was mixing string and []rune and that broke on multi-byte runes and such. Whoops.

Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@francislavoie francislavoie added the bug 🐞 Something isn't working label Feb 26, 2023
@francislavoie francislavoie added this to the v2.7.0 milestone Feb 26, 2023
@francislavoie
Copy link
Member Author

While looking at this, I realized that we were keeping a trailing newline in the heredoc output. That's not a good idea, because it forces the user to always have a newline in the output. If we remove the trailing newline, then the user can just add another newline of their own to include one, if they want it.

@francislavoie francislavoie changed the title caddyfile: Fix fuzz crasher caddyfile: Fix heredoc fuzz crasher, drop trailing newline Feb 26, 2023
Copy link
Member

@mohammed90 mohammed90 left a comment

Choose a reason for hiding this comment

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

Great! Let's get this movin'

@francislavoie francislavoie merged commit f3379f6 into master Feb 26, 2023
@francislavoie francislavoie deleted the fix-heredoc-crasher branch February 26, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fuzz-tokenizer: Slice bounds out of range · caddyfile.(*lexer).next
2 participants