Allow addresses without domains (fixes disabled mailbox-addresses-test)
This commit is contained in:
parent
b0df4d5fd8
commit
c0e8f717e8
2 changed files with 6 additions and 5 deletions
|
|
@ -37,11 +37,13 @@ public void init() {
|
|||
}
|
||||
|
||||
public GMime.FormatOptions get_format_options() {
|
||||
return GMime.FormatOptions.get_default();
|
||||
return GMime.FormatOptions.get_default().clone();
|
||||
}
|
||||
|
||||
public GMime.ParserOptions get_parser_options() {
|
||||
return GMime.ParserOptions.get_default();
|
||||
GMime.ParserOptions opt = GMime.ParserOptions.get_default().clone();
|
||||
opt.set_allow_addresses_without_domain(true);
|
||||
return opt;
|
||||
}
|
||||
|
||||
public string? get_charset() {
|
||||
|
|
|
|||
|
|
@ -27,10 +27,9 @@ class Geary.RFC822.MailboxAddressesTest : TestCase {
|
|||
addrs = new MailboxAddresses.from_rfc822_string("\"=?utf-8?b?dGVzdCIgPHBvdHVzQHdoaXRlaG91c2UuZ292Pg==?==?utf-8?Q?=00=0A?=\" <demo@mailsploit.com>");
|
||||
assert(addrs.size == 1);
|
||||
|
||||
// Disabled since GMime doen't seem to be able to parse both addresses (might be fixable with different parser options)
|
||||
// Courtesy Mailsploit https://www.mailsploit.com
|
||||
//addrs = new MailboxAddresses.from_rfc822_string("\"=?utf-8?Q?=42=45=47=49=4E=20=2F=20=28=7C=29=7C=3C=7C=3E=7C=40=7C=2C=7C=3B=7C=3A=7C=5C=7C=22=7C=2F=7C=5B=7C=5D=7C=3F=7C=2E=7C=3D=20=2F=20=00=20=50=41=53=53=45=44=20=4E=55=4C=4C=20=42=59=54=45=20=2F=20=0D=0A=20=50=41=53=53=45=44=20=43=52=4C=46=20=2F=20?==?utf-8?b?RU5E=?=\", <demo@mailsploit.com>");
|
||||
//assert(addrs.size == 2);
|
||||
addrs = new MailboxAddresses.from_rfc822_string("\"=?utf-8?Q?=42=45=47=49=4E=20=2F=20=28=7C=29=7C=3C=7C=3E=7C=40=7C=2C=7C=3B=7C=3A=7C=5C=7C=22=7C=2F=7C=5B=7C=5D=7C=3F=7C=2E=7C=3D=20=2F=20=00=20=50=41=53=53=45=44=20=4E=55=4C=4C=20=42=59=54=45=20=2F=20=0D=0A=20=50=41=53=53=45=44=20=43=52=4C=46=20=2F=20?==?utf-8?b?RU5E=?=\", <demo@mailsploit.com>");
|
||||
assert(addrs.size == 2);
|
||||
}
|
||||
|
||||
public void from_rfc822_string_quoted() throws GLib.Error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue