]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap-storage: imap-msgpart-url - Add UTF8 support to imap_msgpart_url_get_bodypar...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 26 Aug 2025 02:55:40 +0000 (04:55 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 26 Jan 2026 01:58:58 +0000 (02:58 +0100)
src/imap-urlauth/imap-urlauth-worker.c
src/lib-imap-storage/imap-msgpart-url.c
src/lib-imap-storage/imap-msgpart-url.h
src/lib-imap-urlauth/imap-urlauth-fetch.c

index 1884e7d7595cd7493044c4b46faeb72d3ec730b2..8891acf21a2c526c6d6e049290c403c5d543695f 100644 (file)
@@ -331,7 +331,7 @@ client_fetch_urlpart(struct client *client, const char *url,
        if ((url_flags & IMAP_URLAUTH_FETCH_FLAG_BINARY) != 0)
                imap_msgpart_url_set_decode_to_binary(client->url);
        if ((url_flags & IMAP_URLAUTH_FETCH_FLAG_BODYPARTSTRUCTURE) != 0) {
-               ret = imap_msgpart_url_get_bodypartstructure(client->url,
+               ret = imap_msgpart_url_get_bodypartstructure(client->url, 0,
                                                             bpstruct_r, &error);
                if (ret <= 0) {
                        *errormsg_r = t_strdup_printf(
index 484db44c1c38b84c2d17b9ef2223eded428c1c9d..ad851c09dbec623eb8399c13bbcb70b7cc345140 100644 (file)
@@ -246,6 +246,7 @@ int imap_msgpart_url_verify(struct imap_msgpart_url *mpurl,
 }
 
 int imap_msgpart_url_get_bodypartstructure(struct imap_msgpart_url *mpurl,
+                                          enum imap_quote_flags qflags,
                                           const char **bpstruct_r,
                                           const char **client_error_r)
 {
@@ -257,7 +258,7 @@ int imap_msgpart_url_get_bodypartstructure(struct imap_msgpart_url *mpurl,
        if (ret <= 0)
                return ret;
 
-       ret = imap_msgpart_bodypartstructure(mail, mpurl->part, 0,
+       ret = imap_msgpart_bodypartstructure(mail, mpurl->part, qflags,
                                             bpstruct_r);
        if (ret < 0)
                *client_error_r = mailbox_get_last_error(mpurl->box, NULL);
index 1d88662d8a787486715d09cd36f6578a7210e2bc..c367ad24ef2e6364d92480fb85738d7140a715a5 100644 (file)
@@ -41,6 +41,7 @@ int imap_msgpart_url_read_part(struct imap_msgpart_url *mpurl,
                               const char **client_error_r);
 
 int imap_msgpart_url_get_bodypartstructure(struct imap_msgpart_url *mpurl,
+                                          enum imap_quote_flags qflags,
                                           const char **bpstruct_r,
                                           const char **client_error_r);
 
index 8de957acbc3e0c214215333173fbc1a8ba4dfcfe..03976a6a69b82e264044792bf6e66abf2f3d178e 100644 (file)
@@ -208,8 +208,8 @@ 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, &bpstruct, &error);
+               ret = imap_msgpart_url_get_bodypartstructure(mpurl, 0,
+                                                            &bpstruct, &error);
                if (ret <= 0) {
                        errormsg = t_strdup_printf(
                                "Failed to read URLAUTH \"%s\": %s",