mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-22 23:02:43 +00:00
(fix) handle when mail starts with Bcc header (fixes #4073)
This commit is contained in:
@@ -356,9 +356,17 @@
|
||||
// we find \r\n\r\n, which is the headers delimiter
|
||||
r1 = [cleaned_message rangeOfCString: "\r\n\r\n"];
|
||||
limit = r1.location-1;
|
||||
r1 = [cleaned_message rangeOfCString: "\r\nBcc: "
|
||||
|
||||
// We check if the mail actually *starts* with the Bcc: header
|
||||
r1 = [cleaned_message rangeOfCString: "Bcc: "
|
||||
options: 0
|
||||
range: NSMakeRange(0,limit)];
|
||||
range: NSMakeRange(0,5)];
|
||||
|
||||
// It does not, let's search in the entire headers
|
||||
if (r1.location == NSNotFound)
|
||||
r1 = [cleaned_message rangeOfCString: "\r\nBcc: "
|
||||
options: 0
|
||||
range: NSMakeRange(0,limit)];
|
||||
|
||||
if (r1.location != NSNotFound)
|
||||
{
|
||||
@@ -374,7 +382,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
[cleaned_message replaceBytesInRange: NSMakeRange(r1.location, i-r1.location)
|
||||
[cleaned_message replaceBytesInRange: NSMakeRange(r1.location, i-r1.location+2)
|
||||
withBytes: NULL
|
||||
length: 0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user