]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
make MSCHAP use flat or nested attributes
authorJorge Pereira <jpereira@freeradius.org>
Fri, 26 May 2023 01:54:24 +0000 (22:54 -0300)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 29 May 2023 21:02:48 +0000 (16:02 -0500)
src/modules/rlm_mschap/auth_wbclient.c
src/modules/rlm_mschap/opendir.c

index bc4b00bce26e96f52531fc64aea3d219df9230b8..9a38f1046ea729d33532bb4901849c4978eb87a5 100644 (file)
@@ -182,13 +182,13 @@ int do_auth_wbclient(rlm_mschap_t const *inst, request_t *request,
                        fr_box_strvalue_buffer(normalised_username));
 
                /* Recalculate hash */
-               vp_challenge = fr_pair_find_by_da(&request->request_pairs, NULL, attr_ms_chap_challenge);
+               vp_challenge = fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_ms_chap_challenge);
                if (!vp_challenge) {
                        RERROR("Unable to get MS-CHAP-Challenge");
                        goto release;
                }
 
-               vp_response = fr_pair_find_by_da(&request->request_pairs, NULL, attr_ms_chap2_response);
+               vp_response = fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_ms_chap2_response);
                if (!vp_response) {
                        RERROR("Unable to get MS-CHAP2-Response");
                        goto release;
index d254cb22c85b065ccdb666fc272ae03d8e7234b0..c0faca271abe9870db365d3f67a07d67a942358f 100644 (file)
@@ -239,7 +239,7 @@ unlang_action_t od_mschap_auth(rlm_rcode_t *p_result, request_t *request, fr_pai
        unsigned int t;
 #endif
 
-       response = fr_pair_find_by_da(&request->request_pairs, NULL, attr_ms_chap2_response);
+       response = fr_pair_find_by_da_nested(&request->request_pairs, NULL, attr_ms_chap2_response);
 
        username_string = talloc_array(request, char, usernamepair->vp_length + 1);
        if (!username_string) RETURN_MODULE_FAIL;