if (vb->vb_length == 0) return 0;
- fr_assert(!fr_value_box_is_safe_for(vb, rad_filename_box_make_safe));
+ if (fr_value_box_is_safe_for(vb, rad_filename_box_make_safe)) return 1;
/*
* Allocate an output buffer, only ever the same or shorter than the input
return -1;
}
- if (!fr_value_box_is_safe_for(vb, (fr_value_box_safe_for_t) rad_filename_box_make_safe)) {
- if (rad_filename_box_make_safe(vb, NULL) < 0) {
- RPEDEBUG2("Failed escaping path");
- return -1;
- }
+ if (rad_filename_box_make_safe(vb, NULL) < 0) {
+ RPEDEBUG2("Failed escaping path");
+ return -1;
}
if (fr_sbuff_in_bstrncpy(path_buffer, vb->vb_strvalue, vb->vb_length) < 0) {