Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opendkim-ar: Accept AR header with a no-result as valid syntax. #205

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions opendkim/opendkim-ar.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ ares_parse(u_char *hdr, struct authres *ar)
if (tokens[c][0] == ';')
{
prevstate = state;
state = 3;
state = 14;
}
else if (isascii(tokens[c][0]) &&
isdigit(tokens[c][0]))
Expand All @@ -479,10 +479,20 @@ ares_parse(u_char *hdr, struct authres *ar)
return -1;

prevstate = state;
state = 3;
state = 14;

break;

case 14: /* method or "none" */
if (strcasecmp((char *) tokens[c], "none") == 0)
{
prevstate = state;
state = 15;
continue;
}

/* FALLTHROUGH */

case 3: /* method */
if (n == 0 || !ares_dedup(ar, n))
n++;
Expand Down Expand Up @@ -651,6 +661,10 @@ ares_parse(u_char *hdr, struct authres *ar)
state = 9;

break;

case 15: /* terminal state after no-result */
/* any token should not appear */
return -1;
}
}

Expand Down