]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
json_object_afrom_pair_list only operates on leaf values
authorNick Porter <nick@portercomputing.co.uk>
Wed, 8 Feb 2023 15:05:59 +0000 (15:05 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 18:41:44 +0000 (12:41 -0600)
src/lib/json/json.c

index ef8aa3ce23ce7d79c88895b4b37abb475dcf8cf3..dee76bdf71533a0467ce7615f0dcd0a2ff41cbe1 100644 (file)
@@ -558,6 +558,13 @@ static json_object *json_object_afrom_pair_list(TALLOC_CTX *ctx, fr_pair_list_t
 
                if (vp->da->flags.is_raw) continue;
 
+               switch (vp->da->type) {
+               case FR_TYPE_LEAF:
+                       break;
+               default:
+                       continue;
+               }
+
                /*
                 *      Get attribute name and value.
                 */