Skip to content

Commit

Permalink
auth: Don't lose all forward_ fields if the first passdb lookup fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and villesavolainen committed Jun 16, 2017
1 parent 6266ce1 commit e9799f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/auth/auth-request.c
Expand Up @@ -406,10 +406,13 @@ bool auth_request_import_info(struct auth_request *request,
request->debug = TRUE;
else if (strcmp(key, "client_id") == 0)
request->client_id = p_strdup(request->pool, value);
else if (strcmp(key, "forward_fields") == 0)
else if (strcmp(key, "forward_fields") == 0) {
auth_fields_import_prefixed(request->extra_fields,
"forward_", value, 0);
else
/* make sure the forward_ fields aren't deleted by
auth_fields_rollback() if the first passdb lookup fails. */
auth_fields_snapshot(request->extra_fields);
} else
return FALSE;
/* NOTE: keep in sync with auth_request_export() */
return TRUE;
Expand Down

0 comments on commit e9799f2

Please sign in to comment.