Repository navigation
Conversation
…riods A regression was found in the mailto notifier in which valid email addresses containing dots/periods would be rejected. For example, "mailto:user@example.com" would now be rejected. Add a dot to the allowed characters. Fixes OpenPrinting#1744 Reference: 611d1bd ("Validate notification email addresses and fix sendmail usage (GHSA-r4wf-366f-f6g3)") Signed-off-by: Prarit Bhargava <prarit@redhat.com>
zdohnal
approved these changes
Oct 6, 2026
zdohnal
left a comment
Member
There was a problem hiding this comment.
Sounds reasonable, @michaelrsweet wdyt?
michaelrsweet
approved these changes
Oct 6, 2026
Member
|
Actually I think we want the following change to make it clearer with the validation: diff --git a/notifier/mailto.c b/notifier/mailto.c
index 2f118a674..fe0aa58f9 100644
--- a/notifier/mailto.c
+++ b/notifier/mailto.c
@@ -262,13 +262,14 @@ copy_validate_address(
saw_at = 1;
}
- else if (*bufptr == '.' && (bufptr == buffer || bufptr[-1] == '.' || bufptr[-1] == '@'))
+ else if (*bufptr == '.')
{
/*
* dot-atom-text doesn't allow consecutive periods...
*/
- goto bad_address;
+ if (bufptr == buffer || bufptr[-1] == '.' || bufptr[-1] == '@')
+ goto bad_address;
}
else if (!strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789!#$%&\'*+-/=?^_`{|}~", *bufptr)) |
michaelrsweet
self-requested a review
October 6, 2026 13:01
Member
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.
A regression was found in the mailto notifier in which valid email addresses containing dots/periods would be rejected. For example, "mailto:user@example.com" would now be rejected.
Add a dot to the allowed characters.
Fixes #1744
Reference: 611d1bd ("Validate notification email addresses and fix sendmail usage (GHSA-r4wf-366f-f6g3)")
Signed-off-by: Prarit Bhargava prarit@redhat.com