]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: sasl-server-mech-digest-md5 - Use SASL server settings
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 22 Mar 2023 17:17:15 +0000 (18:17 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
src/auth/sasl-server-mech-digest-md5.c

index 5cba9a58b41dde7a8c50a12c72048ef650c9e78d..9fee35f503531ac9d0b46c8bb303582853f816bb 100644 (file)
@@ -54,7 +54,7 @@ static_assert_array_size(qop_names, QOP_COUNT);
 static string_t *get_digest_challenge(struct digest_auth_request *request)
 {
        struct sasl_server_mech_request *auth_request = &request->auth_request;
-       const struct auth_settings *set = auth_request->request->set;
+       const struct sasl_server_settings *set = auth_request->set;
        buffer_t buf;
        string_t *str;
        const char *const *tmp;
@@ -82,12 +82,12 @@ static string_t *get_digest_challenge(struct digest_auth_request *request)
        request->nonce = p_strdup(auth_request->pool, buf.data);
 
        str = t_str_new(256);
-       if (array_is_empty(&set->realms)) {
+       if (set->realms == NULL) {
                /* If no realms are given, at least Cyrus SASL client defaults
                   to destination host name */
                str_append(str, "realm=\"\",");
        } else {
-               for (tmp = settings_boollist_get(&set->realms); *tmp != NULL; tmp++)
+               for (tmp = set->realms; *tmp != NULL; tmp++)
                        str_printfa(str, "realm=\"%s\",", *tmp);
        }