Skip to content

Commit

Permalink
Cast boxes in a URI to string before escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Oct 19, 2023
1 parent eda10f8 commit b2d364b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/rlm_ldap/rlm_ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2d364b

Please sign in to comment.