Repository navigation
Conversation
larsewi
force-pushed
the
mail-dot-stuffing
branch
from
October 21, 2026 08:28
2afe35c to
f939dac
Compare
Contributor
Author
|
@cf-bottom Jenkins please :) |
olehermanse
reviewed
Oct 21, 2026
| { | ||
| memmove(last, last + 1, sizeof(last) - 1); | ||
| last[sizeof(last) - 1] = recvbuf[i]; | ||
| done = (memcmp(last, "\r\n.\r\n", sizeof(last)) == 0); |
Member
There was a problem hiding this comment.
AFAICT this memcmp could be done after the loop, since the marker should always appear at the end, even if split (?).
olehermanse
approved these changes
Oct 21, 2026
The mock checked each recv() chunk on its own for the end of DATA marker. A chunk boundary inside the body could match it, e.g. when a dot-stuffed line was split across two chunks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
This reverts commit dee2d4d. The test failures were caused by the SMTP mock, fixed in the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Changelog: cf-execd now dot-stuffs mailed output lines starting with '.' Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
larsewi
force-pushed
the
mail-dot-stuffing
branch
from
October 21, 2026 11:17
f939dac to
5cbb764
Compare
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14838/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14838/ |
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.
Reapplies #6411, which was reverted in #6427 because
mail_dot_line.cffailed intermittently.The cause was the SMTP mock used by the cf-execd tests. It checked each
recv()chunk on its own for the end of DATA marker. When the stuffed dot and the rest of the line arrived in separate chunks, a chunk of exactly".\r\n"ended DATA early. The mock now tracks the last bytes across chunks.The mock also no longer loops forever if the connection closes before the end of DATA.
🤖 Generated with Claude Code