mail-server/crates
afontenot b4c00ebe90
Fix off-by-one error in get_blob with Range (#766)
When range.end == decompressed.len(), the last value in the range will
also be the last value in decompressed, because ranges ends are
exclusive.

This issue had two consequences that I have noticed. The first is that
requesting the last (or only) message part via JMAP will result in the
entire message being returned instead, because the range ends on the
last byte of the message.

The second issue, which resulted from the first, was that attempting to
fetch the last (or only) message part would almost always fail when
requested via JMAP if the message part used the quoted-printable
transfer encoding. This is because Stalwart would attempt to decode the
blob, but since the entire file was returned, this would include
headers which are very likely to break assumptions made by the decoder,
e.g. unexpected '=' tokens as in 'charset=UTF-8'

The second issue was originally reported here:
https://github.com/stalwartlabs/mail-server/discussions/758
2024-09-22 09:15:49 +02:00
..
cli Updated CLI deserialization format (closes #360 closes #553) 2024-09-20 19:35:15 +02:00
common Fix compilation without enterprise feature 2024-09-20 12:13:48 +02:00
directory Automatic directory migration 2024-09-20 18:11:19 +02:00
imap IMAP IDLE support for command pipelining (fixes #765) 2024-09-20 08:18:51 +02:00
imap-proto IMAP IDLE support for command pipelining (fixes #765) 2024-09-20 08:18:51 +02:00
jmap Keep a copy of external principal data to support roles and OAuth 2024-09-20 15:52:48 +02:00
jmap-proto Multi-tenancy (closes #212 closes #346 closes #582) 2024-09-13 18:10:56 +02:00
main Automatic directory migration 2024-09-20 18:11:19 +02:00
managesieve Fix compilation without enterprise feature 2024-09-20 12:13:48 +02:00
nlp Branding + fixes 2024-09-19 19:39:35 +02:00
pop3 Branding + fixes 2024-09-19 19:39:35 +02:00
smtp Limit the amount of data that can be fetched from untrusted external HTTP resources 2024-09-20 11:43:25 +02:00
store Fix off-by-one error in get_blob with Range (#766) 2024-09-22 09:15:49 +02:00
trc v0.10.0 2024-09-20 19:05:15 +02:00
utils Branding + fixes 2024-09-19 19:39:35 +02:00