]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fallback to internal dictionary if request->dict not set
authorNick Porter <nick@portercomputing.co.uk>
Thu, 24 Nov 2022 17:34:48 +0000 (17:34 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 29 Nov 2022 12:22:48 +0000 (12:22 +0000)
Currently all trigger args are in the internal dictionary
and request->dict is not set.

src/lib/server/trigger.c

index 45f56a7fe16b356f10a43d413358e657baad350e..346fbbb337806b5d5f9704d35ec1b1bd7c0b7a3e 100644 (file)
@@ -83,7 +83,8 @@ xlat_action_t trigger_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
 
        head = request_data_reference(request, &trigger_exec_main, REQUEST_INDEX_TRIGGER_ARGS);
 
-       da = fr_dict_attr_by_name(NULL, fr_dict_root(request->dict), in_head->vb_strvalue);
+       da = fr_dict_attr_by_name(NULL, fr_dict_root(request->dict ? request->dict : fr_dict_internal()),
+                                 in_head->vb_strvalue);
        if (!da) {
                ERROR("Unknown attribute \"%pV\"", in_head);
                return XLAT_ACTION_FAIL;