]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
when we read a fake packet, mark the pairs as tainted
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Oct 2021 00:50:35 +0000 (20:50 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 13 Oct 2021 00:51:14 +0000 (20:51 -0400)
which should help the rlm_rest test cases

src/bin/unit_test_module.c

index 6ea17b23735570e6f8edb2206358f76ad3ca2b75..f830e025ff34d9581cef15becf79ddcf50fd56e8 100644 (file)
@@ -173,6 +173,13 @@ static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client
                goto error;
        }
 
+       /*
+        *      Pretend that the attributes came in "over the wire".
+        *
+        *      @todo - do this only for protocol attributes, and not internal ones?
+        */
+       fr_pair_list_tainted(&request->request_pairs);
+
        vp = fr_pair_find_by_da(&request->request_pairs, attr_packet_type, 0);
        if (!vp) {
                fr_strerror_printf("Input packet does not specify a Packet-Type");