mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 13:26:28 +03:00
chore: spellcheck
This commit is contained in:
@@ -2202,7 +2202,7 @@ pub async fn send_msg_sync(context: &Context, chat_id: ChatId, msg: &mut Message
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn send_msg_inner(context: &Context, chat_id: ChatId, msg: &mut Message) -> Result<MsgId> {
|
async fn send_msg_inner(context: &Context, chat_id: ChatId, msg: &mut Message) -> Result<MsgId> {
|
||||||
// protect all system messages againts RTLO attacks
|
// protect all system messages against RTLO attacks
|
||||||
if msg.is_system_message() {
|
if msg.is_system_message() {
|
||||||
msg.text = strip_rtlo_characters(&msg.text);
|
msg.text = strip_rtlo_characters(&msg.text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1892,7 +1892,7 @@ fn get_mime_type(mail: &mailparse::ParsedMail<'_>) -> Result<(Mime, Viewtype)> {
|
|||||||
} else {
|
} else {
|
||||||
// Enacapsulated messages, see <https://www.w3.org/Protocols/rfc1341/7_3_Message.html>
|
// Enacapsulated messages, see <https://www.w3.org/Protocols/rfc1341/7_3_Message.html>
|
||||||
// Also used as part "message/disposition-notification" of "multipart/report", which, however, will
|
// Also used as part "message/disposition-notification" of "multipart/report", which, however, will
|
||||||
// be handled separatedly.
|
// be handled separately.
|
||||||
// I've not seen any messages using this, so we do not attach these parts (maybe they're used to attach replies,
|
// I've not seen any messages using this, so we do not attach these parts (maybe they're used to attach replies,
|
||||||
// which are unwanted at all).
|
// which are unwanted at all).
|
||||||
// For now, we skip these parts at all; if desired, we could return DcMimeType::File/DC_MSG_File
|
// For now, we skip these parts at all; if desired, we could return DcMimeType::File/DC_MSG_File
|
||||||
|
|||||||
@@ -702,7 +702,7 @@ pub(crate) fn buf_decompress(buf: &[u8]) -> Result<Vec<u8>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const RTLO_CHARACTERS: [char; 5] = ['\u{202A}', '\u{202B}', '\u{202C}', '\u{202D}', '\u{202E}'];
|
const RTLO_CHARACTERS: [char; 5] = ['\u{202A}', '\u{202B}', '\u{202C}', '\u{202D}', '\u{202E}'];
|
||||||
/// This method strips all occurances of the RTLO Unicode character.
|
/// This method strips all occurrences of the RTLO Unicode character.
|
||||||
/// [Why is this needed](https://github.com/deltachat/deltachat-core-rust/issues/3479)?
|
/// [Why is this needed](https://github.com/deltachat/deltachat-core-rust/issues/3479)?
|
||||||
pub(crate) fn strip_rtlo_characters(input_str: &str) -> String {
|
pub(crate) fn strip_rtlo_characters(input_str: &str) -> String {
|
||||||
input_str.replace(|char| RTLO_CHARACTERS.contains(&char), "")
|
input_str.replace(|char| RTLO_CHARACTERS.contains(&char), "")
|
||||||
|
|||||||
Reference in New Issue
Block a user