Fix incorrect handling for some c= flag cases and sort out issues with simple algorithm due to content modification#21
Open
DerDreschner wants to merge 3 commits intoPHPMailer:mainfrom
Conversation
This was referenced Jan 13, 2026
Merged
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.
The current implementation for the
c=processing doesn't follow the RFC for the following reasons:c=is required for correct processing. This is different than in the RFC, where it is marked as optional. In this case, the defaultc=simple/simplemust be used.c=must contain an explicit rule for both header and body. This doesn't match the allowed values described in the RFC, where it is possible to only set the header rule. In this case, the body is automatically being canonized with thesimplealgorithm.c=simple{/*}are marked as invalid, although they are correct. The reason is a bug in the code where the header content is being modified unintentionally, which results in a hash mismatch.To cover the different use-cases with the
c=flag, I've added some unit tests here as well as a development container as it makes my life a lot easier here.Fixes #10
Fixes #11
Fixes #14
Fixes #15
Closes #17
...as well as some issues on our repository (e.g., nextcloud/mail#12206).