]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap-urlauth: imap-urlauth-fetch - Add IMAP_URLAUTH_FETCH_FLAG_UTF8 flag
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 00:53:24 +0000 (02:53 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 26 Jan 2026 01:58:58 +0000 (02:58 +0100)
src/lib-imap-urlauth/imap-urlauth-fetch.c
src/lib-imap-urlauth/imap-urlauth-fetch.h

index 03976a6a69b82e264044792bf6e66abf2f3d178e..ac789de82bec8089bd7f735ce6c9620b68e0314d 100644 (file)
@@ -178,6 +178,8 @@ imap_urlauth_fetch_local(struct imap_urlauth_fetch *ufetch, const char *url,
        const char *error, *errormsg = NULL, *bpstruct = NULL;
        enum mail_error error_code;
        struct imap_msgpart_url *mpurl = NULL;
+       bool utf8 = HAS_ALL_BITS(url_flags, IMAP_URLAUTH_FETCH_FLAG_UTF8);
+       enum imap_quote_flags qflags = (utf8 ? IMAP_QUOTE_FLAG_UTF8 : 0);
        int ret;
 
        bool success = TRUE;
@@ -208,7 +210,7 @@ imap_urlauth_fetch_local(struct imap_urlauth_fetch *ufetch, const char *url,
                imap_msgpart_url_set_decode_to_binary(mpurl);
        if (success &&
            (url_flags & IMAP_URLAUTH_FETCH_FLAG_BODYPARTSTRUCTURE) != 0) {
-               ret = imap_msgpart_url_get_bodypartstructure(mpurl, 0,
+               ret = imap_msgpart_url_get_bodypartstructure(mpurl, qflags,
                                                             &bpstruct, &error);
                if (ret <= 0) {
                        errormsg = t_strdup_printf(
index 628a95ec2cef4670be072b93a902049525c4adf4..2f58158690ced5e0b6dd945d287ac4d8870d1e11 100644 (file)
@@ -14,6 +14,8 @@ enum imap_urlauth_fetch_flags {
        IMAP_URLAUTH_FETCH_FLAG_BINARY                  = 0x04,
        /* Fetch IMAP bodypartstructure */
        IMAP_URLAUTH_FETCH_FLAG_BODYPARTSTRUCTURE       = 0x08,
+       /* IMAP UTF8 extensions active */
+       IMAP_URLAUTH_FETCH_FLAG_UTF8                    = 0x10,
 };
 
 struct imap_urlauth_fetch_reply {