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

opendmarc-ar: Accept AR header with a no-result as valid syntax. #267

Open
wants to merge 1 commit 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 opendmarc/opendmarc-ar.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,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 @@ -447,10 +447,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 */
n++;
r = 0;
Expand Down Expand Up @@ -619,6 +629,10 @@ ares_parse(u_char *hdr, struct authres *ar)
}

break;

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

Expand Down