Skip to content

Commit

Permalink
Start 2.10.3:
Browse files Browse the repository at this point in the history
LIBOPENDKIM: Make strict header checking non-destructive.  The last change
to this code resulted in failing signatures.  Reported by Pedro
Morales and Wez Furlong.
  • Loading branch information
Murray S. Kucherawy committed May 12, 2015
1 parent dd60ef4 commit 3c04fc8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
5 changes: 5 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This listing shows the versions of the OpenDKIM package, the date of
release, and a summary of the changes in that release.

2.10.3 2015/05/12
LIBOPENDKIM: Make strict header checking non-destructive. The last change
to this code resulted in failing signatures. Reported by Pedro
Morales and Wez Furlong.

2.10.2 2015/05/10
Fix bug #221: Report a DKIM result of "policy" if MinimumKeyBits
or UnprotectedKey cause the signature to result in a "pass"
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AC_PREREQ(2.61)
#
m4_define([VERSION_RELEASE], 2)
m4_define([VERSION_MAJOR_REV], 10)
m4_define([VERSION_MINOR_REV], 2)
m4_define([VERSION_MINOR_REV], 3)
m4_define([VERSION_PATCH], 0)

#
Expand All @@ -23,7 +23,7 @@ m4_define([VERSION_PATCH], 0)
# - bump "revision" with internal source code changes
#
m4_define([LIBVERSION_CURRENT], 10)
m4_define([LIBVERSION_REVISION], 2)
m4_define([LIBVERSION_REVISION], 3)
m4_define([LIBVERSION_AGE], 0)

#
Expand Down
19 changes: 13 additions & 6 deletions libopendkim/dkim.c
Original file line number Diff line number Diff line change
Expand Up @@ -3004,6 +3004,7 @@ dkim_headercheck(DKIM *dkim)
int status;
unsigned char *user;
unsigned char *domain;
unsigned char *tmp;

/* Date (must be exactly one) */
hdr = dkim_get_header(dkim, "Date", 4, 0);
Expand Down Expand Up @@ -3038,13 +3039,19 @@ dkim_headercheck(DKIM *dkim)
}

/* confirm it's parsable */
status = dkim_mail_parse(hdr->hdr_colon + 1, &user, &domain);
if (status != 0 ||
user == NULL || user[0] == '\0' ||
domain == NULL || domain[0] == '\0')
tmp = strdup(hdr->hdr_colon + 1);
if (tmp != NULL)
{
dkim_error(dkim, "From: header field cannot be parsed");
return FALSE;
status = dkim_mail_parse(tmp, &user, &domain);
if (status != 0 ||
user == NULL || user[0] == '\0' ||
domain == NULL || domain[0] == '\0')
{
dkim_error(dkim, "From: header field cannot be parsed");
return FALSE;
}

free(tmp);
}

/* Sender (no more than one) */
Expand Down
2 changes: 1 addition & 1 deletion opendkim/opendkim-testmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ main(int argc, char **argv)
}

/* set flags */
flags = DKIM_LIBFLAGS_FIXCRLF;
flags = (DKIM_LIBFLAGS_FIXCRLF|DKIM_LIBFLAGS_STRICTHDRS);
if (keepfiles)
flags |= (DKIM_LIBFLAGS_TMPFILES|DKIM_LIBFLAGS_KEEPFILES);
(void) dkim_options(lib, DKIM_OP_SETOPT, DKIM_OPTS_FLAGS, &flags,
Expand Down

0 comments on commit 3c04fc8

Please sign in to comment.