]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Cast boxes in a URI to string before escaping
authorNick Porter <nick@portercomputing.co.uk>
Thu, 19 Oct 2023 16:24:15 +0000 (17:24 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 19 Oct 2023 16:24:15 +0000 (17:24 +0100)
src/modules/rlm_ldap/rlm_ldap.c

index 596ddb59312075529585f1f1b86acfce94b9d708..0fae8ac9fd4f82f387282f608092f9dd836506e0 100644 (file)
@@ -445,6 +445,11 @@ static int uri_part_escape(fr_value_box_t *vb, UNUSED void *uctx)
         */
        if (vb->safe == FR_VALUE_BOX_SAFE(1)) return 0;
 
+       /*
+        *      Ensure the box is a string before we attempt to escape it
+        */
+       fr_value_box_cast_in_place(vb, vb, FR_TYPE_STRING, vb->enumv);
+
        /*
         *      Maximum space needed for output would be 3 times the input if every
         *      char needed escaping