From f0d79a4683c97a6c09249977b42a33f247e2c71c Mon Sep 17 00:00:00 2001 From: Pawel Kurowski Date: Wed, 13 May 2020 09:56:47 +0200 Subject: [PATCH] Use correct chunk size in Outlook365 channel --- .../FSecure/C3/Interfaces/Channels/Outlook365RestTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Common/FSecure/C3/Interfaces/Channels/Outlook365RestTask.cpp b/Src/Common/FSecure/C3/Interfaces/Channels/Outlook365RestTask.cpp index 527cc7f..7b19570 100644 --- a/Src/Common/FSecure/C3/Interfaces/Channels/Outlook365RestTask.cpp +++ b/Src/Common/FSecure/C3/Interfaces/Channels/Outlook365RestTask.cpp @@ -33,7 +33,7 @@ size_t FSecure::C3::Interfaces::Channels::Outlook365RestTask::OnSendToChannel(By auto chunkSize = std::min(data.size(), 3 * 1024 * 1024); // Send max 4 MB. base64 will expand data by 4/3. auto fileData = json(); fileData[OBF("Subject")] = m_OutboundDirectionName; - fileData[OBF("Body")][OBF("Content")] = cppcodec::base64_rfc4648::encode(&data.front(), data.size()); + fileData[OBF("Body")][OBF("Content")] = cppcodec::base64_rfc4648::encode(&data.front(), chunkSize); fileData[OBF("Body")][OBF("ContentType")] = OBF("Text"); auto body = fileData.dump();