# HG changeset patch # User Aki Tuomi # Date 1481708576 -7200 # Node ID e39750012d113e2cbaa08d27bb8e11e40dc61ded # Parent 3f4770a7b27c1021af275607f548577b0b8d5889 auth-policy: Allow unsupported attributes in response Do not choke if we receive unsupported attributes in response. This allows better interoperability with different systems that are getting signals from auth policy server that are not (yet) supported by dovecot. diff -r 3f4770a7b27c -r e39750012d11 src/auth/auth-policy.c --- a/src/auth/auth-policy.c Wed Dec 14 10:32:44 2016 +0200 +++ b/src/auth/auth-policy.c Wed Dec 14 11:42:56 2016 +0200 @@ -243,12 +243,13 @@ while((ret = json_parse_next(context->parser, &type, &value)) == 1) { if (context->parse_state == POLICY_RESULT) { if (type != JSON_TYPE_OBJECT_KEY) - break; + continue; else if (strcmp(value, "status") == 0) context->parse_state = POLICY_RESULT_VALUE_STATUS; else if (strcmp(value, "msg") == 0) context->parse_state = POLICY_RESULT_VALUE_MESSAGE; - else break; + else + continue; } else if (context->parse_state == POLICY_RESULT_VALUE_STATUS) { if (type != JSON_TYPE_NUMBER || str_to_int(value, &(context->result)) != 0) break;