From: Nick Porter Date: Thu, 19 Oct 2023 16:24:15 +0000 (+0100) Subject: Cast boxes in a URI to string before escaping X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2d364b400d46b950c8c685d192e5af1741e2a18;p=thirdparty%2Ffreeradius-server.git Cast boxes in a URI to string before escaping --- diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index 596ddb59312..0fae8ac9fd4 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -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