Skip to content

Commit

Permalink
LIBOPENDMARC: Fix bug trusteddomainproject#161: Don't pass the client…
Browse files Browse the repository at this point in the history
… IP address through

htonl() since it's already in network byte order.  This was causing SPF
errors when the internal SPF implementation was in use.
  • Loading branch information
Murray S. Kucherawy committed Apr 14, 2021
1 parent 50275db commit 9da59ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ release, and a summary of the changes in that release.
CVE-2019-20790 file in the "SECURITY" folder
for more details. (#49, #158). Originally reported by
Jianjun Chen, feedback by Simon Wilson and
David Bürgin <[email protected]>
David Bürgin <[email protected]>.
NOTE: OpenDMARC's internal SPF handling will be removed
in a future version. Users are encouraged to
build linked against libspf2. Many pre-built
Expand Down Expand Up @@ -46,6 +46,10 @@ release, and a summary of the changes in that release.
Problem reported by Jan Bouwhuis.
LIBOPENDMARC: Fix bug #89: Repair absurd RRTYPE test in SPF code.
LIBOPENDMARC: Fix bug #104: Fix bogus header field parsing code.
LIBOPENDMARC: Fix bug #161: Don't pass the client IP address through
htonl() since it's already in network byte order. This
was causing SPF errors when the internal SPF
implementation was in use.

1.4.0 2021/01/28
Add ARC support. Extensive work contributed by ValiMail, with patches
Expand Down
1 change: 0 additions & 1 deletion libopendmarc/opendmarc_spf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,6 @@ opendmarc_spf_parse(SPF_CTX_T *spfctx, int dns_count, char *xbuf, size_t xbuf_le
(void) memset(ipnum, '\0', sizeof ipnum);
(void) strlcpy(ipnum, spfctx->ip_address, sizeof ipnum);
ip = inet_addr(ipnum);
ip = htonl(ip);

(void) strlcpy(stack[s].spf, spfctx->spf_record, SPF_MAX_SPF_RECORD_LEN);
SPF_SP = stack[s].spf;
Expand Down

0 comments on commit 9da59ec

Please sign in to comment.