]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't crash when the first component is a HTTP method
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 Feb 2023 02:13:19 +0000 (20:13 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 11 Feb 2023 02:13:19 +0000 (20:13 -0600)
src/modules/rlm_rest/rlm_rest.c

index e9d3b857b90861c95be687470f42771b6827ad3a..6723be598f957e34934a2c6b3fc2309ec9421d62 100644 (file)
@@ -439,7 +439,7 @@ static xlat_action_t rest_xlat(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out,
                 */
                } else {
                        section->method = REST_HTTP_METHOD_CUSTOM;
-                       MEM(section->method_str = talloc_bstrndup(rctx, in_vb->vb_strvalue, in_vb->vb_length));
+                       MEM(section->method_str = talloc_bstrndup(rctx, uri_vb->vb_strvalue, uri_vb->vb_length));
                }
                /*
                 *      Move to next argument