]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fixed crash when using %{passdb:} or %{userdb:} functions when escape_func...
authorTimo Sirainen <tss@iki.fi>
Thu, 5 Nov 2015 09:41:52 +0000 (11:41 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 5 Nov 2015 09:41:52 +0000 (11:41 +0200)
Patch by Michael Slusarz.

src/auth/auth-request-var-expand.c

index 11f78d3328964611d4cf83919389ae9d0bd4a215..da80938db62b7ccc8fe1e2cdcf0c2bb4d287bbb3 100644 (file)
@@ -229,7 +229,7 @@ void auth_request_var_expand_with_table(string_t *dest, const char *str,
 
        memset(&ctx, 0, sizeof(ctx));
        ctx.auth_request = auth_request;
-       ctx.escape_func = escape_func;
+       ctx.escape_func = escape_func == NULL ? escape_none : escape_func;
        var_expand_with_funcs(dest, str, table,
                              auth_request_var_funcs_table, &ctx);
 }