]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Populate randle request pointer
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 19 Jul 2021 21:56:07 +0000 (16:56 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 19 Jul 2021 21:56:07 +0000 (16:56 -0500)
src/modules/rlm_rest/rest.c
src/modules/rlm_rest/rlm_rest.c

index 2785bd771597faa8209ceecb081f61e373918d7e..ecafb30415eb1273b7745dabf0123124c7c4ee32 100644 (file)
@@ -2136,6 +2136,8 @@ void rest_request_cleanup(UNUSED rlm_rest_t const *instance, fr_curl_io_request_
        TALLOC_FREE(ctx->response.buffer);
        TALLOC_FREE(ctx->request.encoder);
        TALLOC_FREE(ctx->response.decoder);
+
+       randle->request = NULL;
 }
 
 /** URL encodes a string.
index 487f43b244ab8c3bde680897bcf8a58f8927cf8b..a3a7574e2f70f82e73e589981d7fdd8139dd17de 100644 (file)
@@ -436,6 +436,8 @@ static xlat_action_t rest_xlat(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out,
 
        fr_assert(in_vb->type == FR_TYPE_GROUP);
 
+       randle->request = request;      /* Populate the request pointer for escape callbacks */
+
        if (fr_uri_escape(&in_vb->vb_group, rest_uri_parts, randle) < 0) {
                RPEDEBUG("Failed escaping URI");