bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
13961419ca9710eb80c254e00510c58c466f3c08 |
|
18-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Handle broken Content-Type headers consistently.
1) Only the first Content-Type header is used. (Simpler than using the last.)
2) Invalid Content-Types are parsed as far as we can. This is mainly to make
sure they aren't treated as missing Content-Types, which could cause them to
become text/plain. |
1bc6f1c54b4d77830288b8cf19060bd8a6db7b27 |
|
11-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: Fixed message_parser_init_from_parts() with truncated MIME headers |
23bdbb7b1831785c6ba6df190f6369da882d2b9d |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Require comparisons to be strict boolean expressions
* No implicit integer -> boolean or pointer -> boolean conversions
* !expr can be used only if expr is boolean type
These were checked with a patched clang. It found various actual bugs,
which were fixed by the previous commits. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
651f981ca065d2365bf2ea07b04318a5402f047a |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Replaced all i_stream_read_data() with _more() and _bytes() |
12fd7a30563f3256642070ef9528dda0d089cb41 |
|
30-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message-parser assert-crashfix
Crashes when multipart MIME header is missing end-of-headers line and the
boundary begins with the same prefix as one of the parent boundaries.
Broken by 7a12331c6 |
12e5ac049bd74f8b98d9dc62adcb0bf3217beef6 |
|
25-Apr-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-mail: return void from message_parser_deinit() |
6df4a174b4cbdc439ed435a0cdc71d4a0126d54a |
|
23-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: Fixed inner MIME part boundary being a prefix of outer boundary. |
7a12331c6360968b141a0888e0bf04dd24145f23 |
|
23-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: Fixed handling duplicate boundary prefixes.
If inner MIME part had the same --boundary prefix as its parent(s) and
the MIME part body started with the inner --boundary prefix, we didn't yet
have it in the list of valid boundaries, so we thought that the outer
boundary was found and the MIME headers were truncated. But due to an extra
bug we still treated it as if it were the inner boundary, except the MIME
part sizes/offsets were set wrong.
This for example fixes a situation where FETCH [1.2.MIME] returns an extra
newline before the actual headers. |
3ef9cfcb6bdd392549080181432bd0cbe2e00850 |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: Added message_parser_deinit_from_parts()
The returned error strings could still be improved to give more details,
especially give an approximate offset of where the problem is. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
f148466c7b648669b99bf20c651ae7fc81d28659 |
|
08-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message-parser was counting body_size wrong for truncated MIME headers after 7d800c55 |
a4392e9d312e3b5973fe5dbaee7028197a700ff0 |
|
30-Dec-2015 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message-parser wasn't returning hdr=NULL blocks after 078c2c8c |
7d800c558b4a40f11748d4ebfc2bf89eb743f03c |
|
15-Dec-2015 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message-parser didn't detect MIME part boundaries in the middle of MIME part headers.
Instead the --boundary line was thought to be part of the header itself. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
02d8f3457ec664408abfd41e33043a405ca42c87 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Added asserts |
7b61cb25a510ab3f76845549a52da9272bc6d6b5 |
|
11-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Message parser now always returns block->data=NULL when it's not supposed to be used. |
86b29828b3bdc796d1e7328a0c1c1e6885c767ce |
|
13-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
lib-mail: message_parser_parse_next_block() now fully clears block_r to be safe case.
I'm not away of this hitting any bugs, but better to be safe. |
0d238cec9a9444742b1ba43f3b46db0ca7863492 |
|
07-May-2014 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Added asserts to make static analyzer happier |
6b8d5b8d02bd888609f06366ffb5a5a1e6e7d251 |
|
17-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Added support for struct message_part <-> index number translations. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
17c29909503e866fe8aab2c4476fb9f34cc2c12e |
|
05-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Fixed infinite loop in message-parser if message ends with --boundary+CR
Thanks to Tomasz Potega for finding this. |
9d257168090b9d1fc5c670b90b6c9a731eddaf11 |
|
15-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Don't assert-crash when multipart doesn't actually have any parts. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
c1b9c4531186c6a7cd92d2c353273a834f8ee66f |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Make static analyzer happier. |
4e8d6d03c2ff85448df79b181a2ea850fb5d4199 |
|
27-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Try to avoid (void) casts by adding more ATTR_NOWARN_UNUSED_RESULT. |
b66d803de86bfb411165b3465b0d9ef64ecfe2a1 |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways. |
3785910c303507db5f629684e6dde2cc7f83668e |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added i_stream_get_data_size(). Used it where possible. |
46512a5964b1c36796400286cf1e72b86b8ea6a8 |
|
20-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
message parser: Added MESSAGE_PARSER_FLAG_INCLUDE_BOUNDARIES flag. |
d6c6713d081cc698423c0b670cd8591b02f05ffa |
|
20-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
message parser: Fixed infinite loop when parsing a specific message. |
e078abde592e1ff977d2ee457756600ea4897962 |
|
20-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
message parser: Fixed infinite loop when parsing a specific message. |
7252810924b15fa9af673653042f8375e53e457b |
|
19-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
message parser: Fixes to handling CRLF linefeeds.
An extra CR could have been left to the end of a MIME part that belonged to
its --boundary. |
35283613d4c04ce18836e9fc431582c87b3710a0 |
|
26-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Changes to make static analyzer happier. |
0e0606d74a05d451b3438922b9a63ebf1755f838 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
message parser: Added MESSAGE_PARSER_FLAG_INCLUDE_MULTIPART_BLOCKS.
Patch by Stephan Bosch. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
9042caa1ad49a3b44cf2b63cbcc66b00c27bab4d |
|
15-Sep-2010 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Previous message parser optimization caused infinite looping with some mails. |
1af608089d525d5c6a59c82cce05e2d09e116b81 |
|
01-Sep-2010 |
Timo Sirainen <tss@iki.fi> |
lib-mail: Optimized message parser code.
Based on patch by Len7hir |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
0a7d137b4cbdabdae6027941e285efb3c8a48c20 |
|
27-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
message_parser_init_from_parts(): Removed wrong assert.
--HG--
branch : HEAD |
3ad3dedbbd92137f410330acc9c5682571778a4e |
|
26-May-2009 |
Timo Sirainen <tss@iki.fi> |
message_parser_init_from_parts(): Assert that MESSAGE_PARSER_FLAG_SKIP_BODY_BLOCK is set.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
ce83243099ae59fb7ee570cda394c79cf6b57041 |
|
05-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
Earlier changes broke message parsing near EOF.
--HG--
branch : HEAD |
6175adce76138470d45c9acf370ebba6d8e1e0ab |
|
30-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
message parser: Cleaned up the code and another attempt at fixing infinite looping.
--HG--
branch : HEAD |
028d1852b1d12054a817656965fb2e60a99402e4 |
|
30-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
message_parser_init_from_parts(): If parts were broken, we may have assert-crashed.
--HG--
branch : HEAD |
dbe3c45bc16f2afbeb431fe3f559cf9ddb0fad61 |
|
22-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
Fixed infinite looping when parsing some (not all) broken multipart mails
that didn't end with proper --boundary--.
--HG--
branch : HEAD |
dabb4cec4cf9bdb34013de682b08f1284cfb670f |
|
24-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Merge RFC 2231 header continuations in BODY/BODYSTRUCTURE replies. Also use
them internally while parsing messages.
--HG--
branch : HEAD |
7f28ca8d7196de9e46eb2cc1264d46cb52d6b7c5 |
|
20-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Message parser: Fixed assert-crash if cached MIME structure was broken.
--HG--
branch : HEAD |
2855f8a57658ff517ec989d7433c21d37dad5339 |
|
02-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
If cached message part showed header's size to be smaller than in reality,
return "broken" instead of assert-crashing.
--HG--
branch : HEAD |
91e40f196c0e7fbfb476af53e8dad97d92f0bc6d |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Assert fix
--HG--
branch : HEAD |
fdfac0bebdf66424e52cfca2bccf07b6a8897710 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Assert fix
--HG--
branch : HEAD |
8a0ad174adb1eb5108511b90e97f4e5f9089b0ee |
|
15-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Memory leak fixes
--HG--
branch : HEAD |
266697d2af982a9e52573404a1dd9cf0898bf43c |
|
15-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Memory leak fixes
--HG--
branch : HEAD |
992118a50af940482b6cf884a89be56d7015580a |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Changed message_parser_deinit() to return -1 if the parser was using
preparsed broken message parts. Callers catch the error and mark the cache
file corrupted.
--HG--
branch : HEAD |
251294c7acff0fc7993300723b7e8794569d37be |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Changed message_parser_deinit() to return -1 if the parser was using
preparsed broken message parts. Callers catch the error and mark the cache
file corrupted.
--HG--
branch : HEAD |
19e8adccba16ff419f5675b1575358c2956dce83 |
|
11-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed T_FRAME_BEGIN/END to T_BEGIN/END. Removed T_FRAME() macro and
replaced them with T_BEGIN/END calls. T_FRAME() made it difficult to debug
code with gdb.
--HG--
branch : HEAD |
10b7de195e0ffcd3de5a3b5a82ed8ea3e9260229 |
|
04-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
The header ending a message/rfc822 doesn't belong to its child MIME part.
Fixes a crash with fetching bodystructure.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
eddd9bf1a1369aea4a2715f6be1137da6d17d293 |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced t_push/t_pop calls with T_FRAME*() macros.
--HG--
branch : HEAD |
943054b081dc19f2b0b8d9f17749cf67838815a3 |
|
03-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Another fix to returning body blocks.
--HG--
branch : HEAD |
805ed530612e61d7ee3f964ef6be661d227f2237 |
|
03-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Message parser wasn't returning body blocks correctly, causing problems with
message body searches.
--HG--
branch : HEAD |
aea5ad34c7c0abdd91c2dc8db66488ea5fda33f2 |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
If we're at EOF but we wanted more data, return what we have so far instead
of ignoring it.
--HG--
branch : HEAD |
2db031260f1ff8b40dcf7fb39c8c10a90e9b8c5c |
|
29-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Infinite looping fixes
--HG--
branch : HEAD |
0e50c91bdf1a470e016a7800020ad061ffbca427 |
|
21-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Handle lines longer than 8192 bytes without going to infinite loop.
--HG--
branch : HEAD |
eaed1f066f95866c53fbc3f527d4c0123c7215cc |
|
06-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Removed message_parser_set_crlfs(). It's no longer needed and it might not
work as wanted anyway.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
648d24583c1574441c4fa0331a90bd4d6e7996c5 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
pool_unref() now takes ** pointer.
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
983a75ef88be63d8b596e165b015bd85bf90b354 |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
By default assume MIME message if Content-Type: exists even if Mime-Version:
doesn't. MESSAGE_PARSER_FLAG_MIME_VERSION_STRICT disables this.
--HG--
branch : HEAD |
687d1dee0e92229232aa8be416897b640df67d07 |
|
20-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Removed message-content-parser. Instead added rfc822_parse_content_type()
and rfc822_parse_content_param() to help parse such headers.
--HG--
branch : HEAD |
49bac471f67fbfb888302af52f31daf96e172eab |
|
18-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
ref/unref stream when parsing it.
--HG--
branch : HEAD |
24e0dd87ae286d9df914f7a4ca0901312f79cec8 |
|
14-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
We wanted to read too many bytes when finding end boundary, which could have
broken the parser.
--HG--
branch : HEAD |
043c8a96a035379bcba04f487d58457beefdfcaa |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Header parser has now flags parameter to tell it how to handle linefeeds.
Changed message parser's boolean parameter to enum as well.
--HG--
branch : HEAD |
dd0dea1fdd913a04bae16e82dd66d67571a5f6c2 |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Removed message_parse_from_parts(). Added message_parser_init_from_parts()
instead. Searching code now uses it whenever possible.
--HG--
branch : HEAD |
0b2b1fb46d726ad68499a37e86cc321ed582d046 |
|
27-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
yet another fix
--HG--
branch : HEAD |
f854c63292b0074eb1d6396381d71696a8146e79 |
|
25-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes
--HG--
branch : HEAD |
de104187d23b9e4d96c3faf75db3be034802436a |
|
14-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes to counting MIME part sizes
--HG--
branch : HEAD |
94271e397d577a3e8787f4d96ae0b3a8b728f321 |
|
08-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
And more fixes
--HG--
branch : HEAD |
40b7682f79987a6c71265faa59ee997135d227e7 |
|
06-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Inifinite looping fixes
--HG--
branch : HEAD |
f47bf451c474c76ebf1f39cdd021ba70d01246f8 |
|
06-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes
--HG--
branch : HEAD |
d065ef8a0cc45163906b83b8e18dc605e0b88867 |
|
06-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes.
--HG--
branch : HEAD |
f7e02a3b6d39c456b1dd3d60bafaf592a20645e8 |
|
14-Jan-2007 |
Timo Sirainen <tss@iki.fi> |
CR removing from parsed mails didn't work properly for multipart mails.
--HG--
branch : HEAD |
59151b71059df1190acd75d8717ed04a7920c862 |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added context parameter type safety checks for most callback APIs.
--HG--
branch : HEAD |
7660b7c18605b7032e064b12edfd8f5838dae6c9 |
|
15-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
message_parser_parse_next_block() returned body part wrong for first header
in MIME blocks, which caused problems.
--HG--
branch : HEAD |
25379350e02f5ebaefe225b08e318cbd6b107132 |
|
09-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Some fixes and added message_parser_set_crlfs().
--HG--
branch : HEAD |
92c3a04218e0203426e3b6361359d00917ec3934 |
|
08-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Added message_part to struct message_block and some cleanups.
--HG--
branch : HEAD |
d96f86fb881c5b106649e8994ead1052acf24030 |
|
08-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Rewrote the message bodystructure parser to allow parsing from non-blocking streams. Also did a couple of API changes and cleanups.
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
11da9baca9749e1645f217bb64ba5c98ce74033a |
|
27-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
If message header ends unexpectedly, return it anyway instead of ignoring it
completely.
--HG--
branch : HEAD |
485cd143b2ecd0215396188702292570591f4ebc |
|
12-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Boundary line could have been included in next message part's headers.
--HG--
branch : HEAD |
7d8eab023543d49772e1ffcfbf1e846cfb17f0af |
|
13-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
MIME boundary parsing fix.
--HG--
branch : HEAD |
3b53bdca18969ed69f1e3fae9dc8877b28637427 |
|
06-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
We didn't handle properly missing boundaries.
--HG--
branch : HEAD |
f0e123a7b3b7315a3ea954f9ce1baaddf7c03fab |
|
26-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Don't show extra LFs in lines longer than input buffer size.
--HG--
branch : HEAD |
4b058f90f9e8a2c6b2eed275de4eb8cc5195a71d |
|
08-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Buffer API change: we no longer support limited sized buffers where
writes past limit wouldn't kill the process. They weren't used hardly
anywhere, they could have hidden bugs and the code for handling them was too
complex.
This also changed base64 and hex-binary APIs.
--HG--
branch : HEAD |
24a30d52ca5b5ae78a9fb56cc9f9b8e9ec416dd0 |
|
08-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
fix
--HG--
branch : HEAD |
e819dc8ca77dced4c9e866250675528381cf36f6 |
|
07-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
fix for last fix..
--HG--
branch : HEAD |
57a37b627ccd576012759c84d6beb77bc9526f0b |
|
07-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Fixes for handling headers longer than input buffer.
--HG--
branch : HEAD |
76d9b7e1207f2b556e22356286026440822fb8b2 |
|
23-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
fix
--HG--
branch : HEAD |
9b1d6da0f2b42b8b6f612a570a83355c2a5088ee |
|
21-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Fixes for nonblocking streams.
--HG--
branch : HEAD |
2e3aa3e1415fa0aa36013c5fa3ac09b3ee3569ef |
|
21-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
If headers don't end with linefeed and there's no ':' in the line,
don't hide the data.
--HG--
branch : HEAD |
5a2917dd7248d61c540dd310627a781934ba5334 |
|
22-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
message_parse_header_next() can now return "need more data" with nonblocking
input streams.
--HG--
branch : HEAD |
60576cd64e6a537413cd90104f7e862f71d48c81 |
|
31-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Added struct message_header_line.middle and middle_len to contain the ':'
in header and whitespace around it.
--HG--
branch : HEAD |
61ccb477ca7411925079d9d05a3487ed3a20bf53 |
|
28-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
full_value should contain LFs as well
--HG--
branch : HEAD |
2632143b0175c933bec1e59b5dc0811a095dc18d |
|
17-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added skip_initial_lwsp parameter to message_parse_header_init().
--HG--
branch : HEAD |
cadcc24bb0e8263fa90c046f6ee98c47ef1c288f |
|
16-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Handle missing last \n from headers more correctly
--HG--
branch : HEAD |
f2d40f82a9fa08c238a2fd37b5a594ca80506b13 |
|
09-May-2004 |
Timo Sirainen <tss@iki.fi> |
If value of header contains only LWSP, return all LWSP instead of returning
just empty value.
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |
5e63deb8afbcbf466abb84acc3fb28a1e33ab17a |
|
11-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
wrong fix, reverted plus a cleanup..
--HG--
branch : HEAD |
ef8a01f86b69fe559c811e00bddf2b4894f823d1 |
|
11-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
When parsing message with CRLF headers, we stopped after CRLFCR instead of
CRLFCRLF.
--HG--
branch : HEAD |
4e8b456590e76a3c53c3bf638f87e0fe5c0cec96 |
|
03-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
mbox reading is kind of working again. Just don't try rewriting or expunging
:) Changing headers are also hidden from clients so mbox messages are finally
seen immutable as required by IMAP.
--HG--
branch : HEAD |
96541d31299bb40b5a6efdbf9b4cb3d4f4b4a069 |
|
21-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Message parsing can now be done in two parts - header and body. We're now
more eager at parsing MIME structure for message. It's done whenever body
has to be fully read (eg. rfc822.size).
--HG--
branch : HEAD |
645f258ea29afaf09b673fc65d1bd788dfec8db8 |
|
20-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
If BODY/BODYSTRUCTURE is requested with some other headers, parse the
headers only once. If body contains multiple MIME parts, cache the internal
MIME structure so BODY[part] fetching doesn't need to parse it again.
--HG--
branch : HEAD |
335dd3839ffdd7c397cff6c5cda0282648470e0a |
|
06-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
"Content-Type: text" (without '/') didn't mark the message as containing
text, which generated broken BODYSTRUCTUREs.
--HG--
branch : HEAD |
ccc1e87e2e5d951de7703aeef2bfc90fec9f467c |
|
13-Jul-2003 |
Timo Sirainen <tss@iki.fi> |
Ignore Content-* headers if there's no MIME-Version header. Note that this
change breaks cached message parts in indexes.
--HG--
branch : HEAD |
7834c4baef139975368433cb890e0d914412e61d |
|
05-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Removed useless parameters from message_get_body_size(). Also did some small
optimizations to it.
--HG--
branch : HEAD |
6e0054c2e5efc526df6287da368335680a856714 |
|
04-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
IMAP protocol doesn't allow server to send NULs to client. Send ascii #128
instead.
--HG--
branch : HEAD |
12c01f5700e47602786eb6eac7404e6ed85df513 |
|
04-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
message_parse_header(): skip all LWSP after ':' or in continued header. It's
not what RFC2822 says, but it's historically better behaviour.
--HG--
branch : HEAD |
cb237016bc349309576b8f63b44571d8ebab6709 |
|
23-May-2003 |
Timo Sirainen <tss@iki.fi> |
Reset line->name and full_value* fields at end of headers. Envelope parser
was treating the EOH as duplicate of last header.
--HG--
branch : HEAD |
1002b7b24fa2447639c66f97078021dad1fda146 |
|
03-May-2003 |
Timo Sirainen <tss@iki.fi> |
We stopped parsing message if there was a line longer than input buffer
(8192 bytes).
--HG--
branch : HEAD |
e658f2bfa3bb4555dbea5ae08d2ba090305ae2fe |
|
01-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
crashfix
--HG--
branch : HEAD |
5bc4a5fd9a421f4c5763e03c0449479cedcf9f06 |
|
26-Mar-2003 |
Timo Sirainen <tss@iki.fi> |
Better handling for multiline headers. Before we skipped headers larger than
input buffer size (8k with read (default), 256k with mmap). The skipping was
also a bit buggy.
Now we parse the lines one at a time. There's also a way to read the header
fully into memory before parsing it, if really needed.
--HG--
branch : HEAD |
f5903a8270d9f1bb846698229b698c15edb10b08 |
|
25-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
A few small fixes to MIME and mail address parsers.
--HG--
branch : HEAD |
c7c61c4a22a431adf1561f9aa87e34fa94586d2e |
|
31-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Handle boundary=""
--HG--
branch : HEAD |
7c424aa51c956c628e3512055841aa2f9eef4833 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Function typedefs now define them as functions, not function pointers.
--HG--
branch : HEAD |
f923659c0e5298263d80622c99f4dc4132b4675b |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming change for function typedefs.
--HG--
branch : HEAD |
c0435c854a0e7246373b9752d163095cc4fbe985 |
|
05-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
--HG--
branch : HEAD |
a3ea111cfdbfd4f32baeb0bd7f1d72568c60a023 |
|
04-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Use unsigned char* when accessing non-NUL terminating strings. Compiler
warnings would then notify about accidentally passing them to functions which
require them NUL-terminated. Changed a few functions to use void* to avoid
unneeded casting.
--HG--
branch : HEAD |
4a6f9ed8e5412508dcba1eabb58a3680ad5e9b68 |
|
03-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Rewrote rfc822-tokenize.c to work one token at a time so it won't uselessly
take memory, maybe also a bit faster. This caused pretty large changes all
around.
Also moved all string (un)escaping code to lib/strescape.c.
--HG--
branch : HEAD |
a4018920911d87ac72220072ef68b86bcc38803a |
|
29-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
extra assert.
--HG--
branch : HEAD |
907035872354e895a0c4431e1e42cd21d456f3ea |
|
27-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Some bugfixes and speedups for partial fetch handling.
--HG--
branch : HEAD |
def516ea503a60f20d510c14d5070b7ff5bbddf4 |
|
08-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Added buffer API. Point is to hide all buffer writing behind this API which
verifies that nothing overflows. Much better than doing the same checks all
around the code, even if it is slightly slower.
Buffer reading is still mostly done directly, that isn't such a big security
risk and I can't think of a reasonable API for it anyway.
--HG--
branch : HEAD |
ecc81625167ed96c04c02aa190a1ea5baa65b474 |
|
06-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Renamed IBuffer and OBuffer to IStream and OStream which describes their
functionality better. I tried to keep the variable names and comments also
sensible.
--HG--
branch : HEAD |
ca8863af6ce6b695a369dfb7b50e909420dc45df |
|
04-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Several minor fixes: signess, casting away const, missing static, etc.
--HG--
branch : HEAD |
4d2e4d7137aa8fdae324dfb6466c4b44a90ebae1 |
|
25-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
still not right
--HG--
branch : HEAD |
9a37fd13cdd6d0fd10fd9392e0d58c1ef9ce053a |
|
25-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Header parser was still a bit wrong.
--HG--
branch : HEAD |
cb69d97c91af341b1a388dfbd869f65f40e6637e |
|
25-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Header parsing should always keep one character lookahead, so it can see if
header continues in next line. This wasn't done properly.
--HG--
branch : HEAD |
c6768ddd3e599361ffc1ced39537be808edaf419 |
|
25-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
More (char *) -> (const char *) fixes
--HG--
branch : HEAD |
b646fdb90f75ab80ea7feca42fa2e1f8e788b004 |
|
14-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Split IOBuffer into mmaped IBuffer, file IBuffer, memory data IBuffer and
file OBuffer.
--HG--
branch : HEAD |
1f4b9beda52e08d3db29746370af05bee17670c4 |
|
05-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
message_parse_header() now calls the function with empty name/value at end
of headers. we use this feature with mbox to allow usage of Content-Length
header field.
--HG--
branch : HEAD |
69c0e4402662eb420853c11b8c27223a0bb8f0db |
|
05-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
compiler warning fixes
--HG--
branch : HEAD |
37d34c871f4be045e27bcb3b53d52eec10b6ccb1 |
|
23-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
IOBuffer cleanup, hopefully fixes some mbox problems.
--HG--
branch : HEAD |
81c441a860c68deefa00972c73c08443107a2582 |
|
17-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
message_parse_header() went to infinite loop with partial header
--HG--
branch : HEAD |
764a265ea144120a5ddd0ebae6b7db84073461b5 |
|
16-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
message_parse_header() works now properly if there's no message body at all,
or if the ending \n is missing from header.
--HG--
branch : HEAD |
1c64ce475b982a84d55ce3028721e4a123b05ef2 |
|
15-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
s/io_buffer_read_data/io_buffer_read_data_blocking/ and fixed the various
kludges elsewhere to use it more easily
--HG--
branch : HEAD |
0502fb59070f248964db772ed0040d63555a9432 |
|
10-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
message/rfc822 mime parts weren't parsed correctly
--HG--
branch : HEAD |
6697a923d6768bf8d71f87f80b90747cf6870753 |
|
08-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
move size_t fixes
--HG--
branch : HEAD |
f755df78a17a7c003a182594ab78b0325d929ad4 |
|
07-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Don't strip extra spaces after "field: ".
--HG--
branch : HEAD |
5f6368ee09ba3edfb9b582199c2730a7b5517a10 |
|
04-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
message_parse_header() was buggy with big headers, and io_buffer_read_data()
should have returned the data so far even if it overflowed.
--HG--
branch : HEAD |
53192182b8c5462c14941e563d6052ce2102eabf |
|
02-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Fixed rfc822_tokens_get_value(). It doesn't have "put spaces around all
tokens" option anymore, but instead spaces are always put between atoms.
This should fix address fields with non-7bit charset.
--HG--
branch : HEAD |
30e8beb5b2322d92093cbfbc8f47d227a185fcd5 |
|
02-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Added support for caching of MessagePart data. This is useful for fetching
body[part]s. Also BODY and BODYSTRUCTURE can be generated fast using it.
Also fixed index corruption in some situations when more cached data was
added to index.
--HG--
branch : HEAD |
da18528bccce3e1ba9c97c7bf06799b952d7bc3f |
|
01-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
there was no need for MessagePart->pos.virtual_pos, so removed it.
--HG--
branch : HEAD |
ec9d382ea6adbf2c8a0e5dd304acb629ebed3203 |
|
27-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
to be able to handle off_t overflows properly. Also changed a few unsigned
int fields into uoff_t so we should now support >2G mails if uoff_t is
64bit. Also fixed several potential integer overflows.
--HG--
branch : HEAD |
1215bc4d7e747846f282cf710e61f3768e69238d |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
s/user_data/context/ and some s/Data/Context/
--HG--
branch : HEAD |
7317807bed321d9d8a7e7b9086947f38e2d9e333 |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
fixes, seems to be somewhat working now.
--HG--
branch : HEAD |
7bf3aa859bfcfac9b26571fb2948bef61677fb2f |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
removed useless p_free() calls
--HG--
branch : HEAD |
e403d34ae6904cd8d9f72345a2f2dc017d3b46aa |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Message data is parsed in blocks (no longer entirely mmap()ed). Several
IOBuffer changes. All mixed signed/unsigned comparisions were fixed so code
can now be compiled with gcc's -W flag. mbox support is broken currently,
and there's most likely several other problems too.
--HG--
branch : HEAD |
66251e6ab31e5cc153fe5cae608e416dacafe9cd |
|
08-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Initial revision
--HG--
branch : HEAD |