]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correctly escape LDAP uri in map
authorNick Porter <nick@portercomputing.co.uk>
Thu, 24 Aug 2023 10:44:53 +0000 (11:44 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 24 Aug 2023 10:44:53 +0000 (11:44 +0100)
src/modules/rlm_ldap/rlm_ldap.c

index 0ed32af02f9fd1e5b9648c4cdd0a53c7714b2182..da1b42a7abc1ea591e21b7a9d82b98c8a4cdc6eb 100644 (file)
@@ -1037,12 +1037,12 @@ static unlang_action_t mod_map_proc(rlm_rcode_t *p_result, void *mod_inst, UNUSE
        int                     ldap_url_ret;
        fr_ldap_thread_trunk_t  *ttrunk;
 
-       fr_value_box_t          *url_head = fr_value_box_list_head(url);
+       fr_value_box_t          *url_head;
        ldap_map_ctx_t          *map_ctx;
 
-       /*
-        *      FIXME - Maybe it can be NULL?
-        */
+       if (fr_uri_escape(url, ldap_uri_parts, NULL) < 0) RETURN_MODULE_FAIL;
+
+       url_head = fr_value_box_list_head(url);
        if (!url_head) {
                REDEBUG("LDAP URL cannot be (null)");
                RETURN_MODULE_FAIL;