Skip to content

Commit

Permalink
auth: Support client_id variable
Browse files Browse the repository at this point in the history
When imap_id_retain is turned on, contains
the client ID request content with dovecot
special vars removed.
  • Loading branch information
cmouse authored and sirainen committed Mar 21, 2017
1 parent 7ee65ad commit ccb936a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/auth/auth-request-var-expand.c
Expand Up @@ -46,6 +46,7 @@ auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_COUNT+1] = {
{ '\0', NULL, "auth_username" },
{ '\0', NULL, "auth_domain" },
{ '\0', NULL, "local_name" },
{ '\0', NULL, "client_id" },
/* be sure to update AUTH_REQUEST_VAR_TAB_COUNT */
{ '\0', NULL, NULL }
};
Expand Down Expand Up @@ -173,6 +174,8 @@ auth_request_get_var_expand_table_full(const struct auth_request *auth_request,
tab[33].value = escape_func(auth_request->local_name, auth_request);
else
tab[33].value = "";
if (auth_request->client_id != NULL)
tab[34].value = escape_func(auth_request->client_id, auth_request);
return ret_tab;
}

Expand Down
2 changes: 1 addition & 1 deletion src/auth/auth-request-var-expand.h
Expand Up @@ -8,7 +8,7 @@ auth_request_escape_func_t(const char *string,
#define AUTH_REQUEST_VAR_TAB_USER_IDX 0
#define AUTH_REQUEST_VAR_TAB_USERNAME_IDX 1
#define AUTH_REQUEST_VAR_TAB_DOMAIN_IDX 2
#define AUTH_REQUEST_VAR_TAB_COUNT 34
#define AUTH_REQUEST_VAR_TAB_COUNT 35
extern const struct var_expand_table
auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_COUNT+1];

Expand Down

0 comments on commit ccb936a

Please sign in to comment.