[dovecot/core] 3ca901: lib-mail: message_address_write: Fix generating em...
GitHub
noreply at github.com
Mon Jun 12 17:07:35 EEST 2017
Branch: refs/heads/master-2.2
Home: https://github.com/dovecot/core
Commit: 3ca901575d169e15b3c9223909dd467819b99614
https://github.com/dovecot/core/commit/3ca901575d169e15b3c9223909dd467819b99614
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_write: Fix generating empty group list
Empty group list ends with ": " not with ", ".
Test case:
{ { name = NULL, mailbox = "group", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }
converts to:
group:;
Commit: 62630b5c6f9b10b0fb2d4e154c893b31742d63e8
https://github.com/dovecot/core/commit/62630b5c6f9b10b0fb2d4e154c893b31742d63e8
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_write: Fix generating group list with empty name
Empty name for group list must be quoted.
Test case:
{ { name = NULL, mailbox = "", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }
converts to:
"":;
Commit: eafb1c5a589279bc5d2f8940dbcd2d41f844cd25
https://github.com/dovecot/core/commit/eafb1c5a589279bc5d2f8940dbcd2d41f844cd25
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if last_comment is not NULL
This will fix possible NULL pointer dereference when caller does not set last_comment.
Commit: bde3ab4dd1cb983a2e54037d011872a2753f5941
https://github.com/dovecot/core/commit/bde3ab4dd1cb983a2e54037d011872a2753f5941
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: parse_addr_spec: Email address without local-part is invalid
Add explicit invalid_syntax flag also when end of input occure because
address is without domain invalid and in this case it was not correctly
propagated.
Commit: 7e9b80a019b6e96fe40a93a4f813a3b2d058809b
https://github.com/dovecot/core/commit/7e9b80a019b6e96fe40a93a4f813a3b2d058809b
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: parse_mailbox: Set display name instead mailbox when parsing failed
It does not make sense to set mailbox without domain on incorrect input.
Rather set display name which is more likely useable value.
Test case:
test
is parsed as:
{ name = "test", mailbox = NULL, domain = NULL }
Commit: 3e209e9d36e48fb1f0e294b216eb1ba6f8aafcb7
https://github.com/dovecot/core/commit/3e209e9d36e48fb1f0e294b216eb1ba6f8aafcb7
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_write: Quote and escape strings if needed
ATEXT characters must be properly quoted when are in phrase.
Test case:
{ name = "test\"test", mailbox = "user", domain = "host" }
converts to:
"test\"test" <user at host>
Commit: 82bc726ff7c4a4f40ec3e4314c677ff41f37d577
https://github.com/dovecot/core/commit/82bc726ff7c4a4f40ec3e4314c677ff41f37d577
Author: Pali Rohár <pali.rohar at gmail.com>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: Update tests for message address
Commit: f088f5188a2757cd1b87bfe141d743fb66f5cb47
https://github.com/dovecot/core/commit/f088f5188a2757cd1b87bfe141d743fb66f5cb47
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: Fixed to 91fdb25b5
Caused by my manual edits to avoid the -Wstrict-bool warnings.
Commit: 3f0b3012a2edf25d7180be7a9750f87e34df60b3
https://github.com/dovecot/core/commit/3f0b3012a2edf25d7180be7a9750f87e34df60b3
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-fs/fs-randomfail.c
M src/lib-mail/message-address.c
M src/lib/ioloop-epoll.c
M src/lib/ioloop-poll.c
Log Message:
-----------
-Wstrict-bool warning fixes
Commit: fe4928cf2d8987574e28ac063087e309bb01426e
https://github.com/dovecot/core/commit/fe4928cf2d8987574e28ac063087e309bb01426e
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: test-message-address cleanup
Merge input and output into the same struct to make it clearer.
Commit: 5e0e049693f042d939675eb423a2702fc13f9b53
https://github.com/dovecot/core/commit/5e0e049693f042d939675eb423a2702fc13f9b53
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: test-message-address - Test also writing invalid addresses
Commit: 258c8f29b409e36751e0e0d023bba1ab6c178073
https://github.com/dovecot/core/commit/258c8f29b409e36751e0e0d023bba1ab6c178073
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_write() - Don't add '@' if domain is missing
Commit: 880012f92c76af24ebf074427789a2bfa39b2b90
https://github.com/dovecot/core/commit/880012f92c76af24ebf074427789a2bfa39b2b90
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_write() - Don't write empty <>
Commit: 175de9ec7ccbf1d16f3a2fc0da92ced12b8931eb
https://github.com/dovecot/core/commit/175de9ec7ccbf1d16f3a2fc0da92ced12b8931eb
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_write() - Always write <user at domain> as output
This is the standard format nowadays, so don't convert <user at domain> into
plain user at domain.
Commit: a933364cd8e9591f78ceb75f578f3884b7b7e173
https://github.com/dovecot/core/commit/a933364cd8e9591f78ceb75f578f3884b7b7e173
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_write() - Write empy username as ""
We can't output <@domain> because that conflicts with the <@route:...>
syntax. Also ""@domain seems to be a valid address.
Commit: 8a1087fd6aeb3bd4c498f6af316d3ece8130a87e
https://github.com/dovecot/core/commit/8a1087fd6aeb3bd4c498f6af316d3ece8130a87e
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - Add INVALID_ROUTE/SYNTAX_ERROR only if fill_missing==TRUE
This allows message_address_write() to write the parsed invalid address in a
way that at least somewhat resembles the original input.
Commit: 7b7f965c48ed851ee19748db783b80b3d3a905c3
https://github.com/dovecot/core/commit/7b7f965c48ed851ee19748db783b80b3d3a905c3
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: test-message-address - add more and better organized tests
Commit: a646e69cac3949281b628dbebf2f21e56b58d28d
https://github.com/dovecot/core/commit/a646e69cac3949281b628dbebf2f21e56b58d28d
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - Remove unnecessary NULL checks
message_address_parse() always initialized rfc822_parser_init() with
last_comment string.
Commit: 2e9153d5d7ee1ad7aecacdc72db5b181565af88e
https://github.com/dovecot/core/commit/2e9153d5d7ee1ad7aecacdc72db5b181565af88e
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - Fix reading out-of-bounds read on invalid input
Commit: 49c13c7cc0c234c723a1daf688bd00d9d8b47ea9
https://github.com/dovecot/core/commit/49c13c7cc0c234c723a1daf688bd00d9d8b47ea9
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - don't stop at invalid addresses when parsing group
Also the end-group's message_address shouldn't have invalid_syntax=TRUE,
except when we didn't actually find the ending ';'
Commit: 4be38dbed0ce742e101dc26ebc19c63b22c10a7f
https://github.com/dovecot/core/commit/4be38dbed0ce742e101dc26ebc19c63b22c10a7f
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - don't stop at <> when parsing address lists
And similarly don't stop at <@domain>
Commit: 585eeb5d7c6deb7ee28dc46dd09fd25bc655fe27
https://github.com/dovecot/core/commit/585eeb5d7c6deb7ee28dc46dd09fd25bc655fe27
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: Improve test-message-address to test invalid addresses in lists
Test in both a group and list of addresses.
Commit: e51455e76e52449525da2e92851d034ea51cf390
https://github.com/dovecot/core/commit/e51455e76e52449525da2e92851d034ea51cf390
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - Handle invalid standalone phrases better
We'll treat "local-part" (without quotes) as a mailbox even without
@domain, but if it continues with anything or if it's a quoted-string,
we'll treat it as a display-name instead.
This is probably better than just converting everything to display-name,
since there are likely to exist headers like "To: localuser"
Commit: a6a68d990ce9dda5b26c9124c8e73e566f924cc0
https://github.com/dovecot/core/commit/a6a68d990ce9dda5b26c9124c8e73e566f924cc0
Author: Timo Sirainen <timo.sirainen at dovecot.fi>
Date: 2017-06-12 (Mon, 12 Jun 2017)
Changed paths:
M src/lib-mail/message-address.c
M src/lib-mail/test-message-address.c
Log Message:
-----------
lib-mail: message_address_parse() - Fix fill_missing==TRUE handling
Mainly MISSING_DOMAIN wasn't set in all situations. Also added unit tests.
Compare: https://github.com/dovecot/core/compare/410ef08d75e7...a6a68d990ce9
More information about the dovecot-cvs
mailing list