Skip to content

Commit 330426e

Browse files
committedDec 12, 2024·
midb: add missing folder name encoding for bcast events and P-SUBL response
Fixes: gromox-2.37-66-gfd5fe4d2d References: GXH-115
1 parent 6b8c28d commit 330426e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎exch/midb/mail_engine.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ static int mail_engine_psubl(int argc, char **argv, int sockd) try
27922792
rsp.reserve(65536);
27932793
for (; pstmt.step() == SQLITE_ROW; ++count)
27942794
rsp += std::to_string(pstmt.col_uint64(0)) + " " +
2795-
znul(pstmt.col_text(1)) + "\r\n"s;
2795+
base64_encode(znul(pstmt.col_text(1))) + "\r\n"s;
27962796
pstmt.finalize();
27972797
pidb.reset();
27982798
rsp.insert(0, "TRUE " + std::to_string(count) + "\r\n");
@@ -3618,7 +3618,7 @@ static void mail_engine_delete_notification_message(IDB_ITEM *pidb,
36183618
gx_sql_col_uint64(pstmt, 0) != folder_id)
36193619
return;
36203620
system_services_broadcast_event(fmt::format("MESSAGE-EXPUNGE {} {} {}",
3621-
username, folder_name, pstmt.col_uint64(1)).c_str());
3621+
username, base64_encode(folder_name), pstmt.col_uint64(1)).c_str());
36223622
pstmt.finalize();
36233623
qstr = fmt::format("DELETE FROM messages WHERE message_id={}", message_id);
36243624
gx_sql_exec(pidb->psqlite, qstr.c_str());
@@ -4010,7 +4010,7 @@ static void mail_engine_notification_proc(const char *dir,
40104010
return;
40114011
std::string name = znul(stm.col_text(0));
40124012
stm.finalize();
4013-
qstr = fmt::format("FOLDER-TOUCH {} {}", pidb->username, name);
4013+
qstr = fmt::format("FOLDER-TOUCH {} {}", pidb->username, base64_encode(name));
40144014
system_services_broadcast_event(qstr.c_str());
40154015
}
40164016
} catch (const std::bad_alloc &) {

0 commit comments

Comments
 (0)
Please sign in to comment.