From f777b6465831b113d6d54d7ca4d71a1207021a61 Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Tue, 15 Jun 2010 15:07:54 +0000 Subject: [PATCH] Merge branches/debian/ rev. 4976: validate parsed recipient addresses. --- changelog | 2 ++ patches/28-valid-recipient.patch | 20 ++++++++++++++++++++ patches/series | 1 + 3 files changed, 23 insertions(+) create mode 100644 patches/28-valid-recipient.patch diff --git a/changelog b/changelog index 5f58064..450a95d 100644 --- a/changelog +++ b/changelog @@ -11,6 +11,8 @@ dma (0.0.2009.08.29-1) UNRELEASED; urgency=low - add the 26-getprogname patch to use program_invocation_short_name() instead of getprogname() on GNU systems - add the 27-int-size patch to cast a variable to the correct type + - add the 28-valid-recipient patch to fix parsing recipients out of + the message body - refresh 01-debian-build, 03-debian-locations, 04-debian-setgid, 09-typos, 10-liblockfile, 11-double-bounce, 17-mailname, 23-dirent-d_type, 24-random-message-id, and 25-unsupported-starttls diff --git a/patches/28-valid-recipient.patch b/patches/28-valid-recipient.patch new file mode 100644 index 0000000..6d8fc19 --- /dev/null +++ b/patches/28-valid-recipient.patch @@ -0,0 +1,20 @@ +Description: Check the parsed recipient address for validity. + I'll forward this patch when I catch up with the dma upstream. +Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/ +Forwarded: no +Author: Peter Pentchev +Last-Update: 2010-06-15 + +--- a/mail.c ++++ b/mail.c +@@ -428,8 +428,8 @@ + if (addr == NULL) + errlog(1, NULL); + +- add_recp(queue, addr, 1); +- fprintf(stderr, "parsed `%s'\n", addr); ++ if (add_recp(queue, addr, 1) != 0) ++ errlogx(1, "invalid recipient `%s'", addr); + goto again; + } + diff --git a/patches/series b/patches/series index 7d3d408..e60f17d 100644 --- a/patches/series +++ b/patches/series @@ -11,3 +11,4 @@ 25-unsupported-starttls.patch 26-getprogname.patch 27-int-size.patch +28-valid-recipient.patch -- 2.47.3