Commit graph

13 commits

Author SHA1 Message Date
Michael Gratton
ab77067d8a Fix RFC822.Header.get_header_names returning null names
The custom GMime VAPI assumed the call to get_iter() actually returned a
new iter, but it doesn't. Fix that, update Header class style, and add
tests.
2019-10-22 17:20:52 +11:00
Michael Gratton
6af84001f2 Fix another GMime custom binding abstract ctors
Silences compiler warnings produced by current vala head
2019-07-17 18:28:38 +10:00
Michael Gratton
f07c84adb3 Fix GMime custom binding abstract ctors
Silences compiler warnings produced by current vala head
2019-07-17 15:36:09 +10:00
Michael James Gratton
8a1906fa96 Ensure encoded mailbox addresses are decoded correctly.
Both RFC mailbox address names and mailboxes/local-names may by RFC 2047
be Quoted-Printable or Base64 encoded. This patch ensures these parts are
correctly decoded when parsing a RFC 822 message, so that they are
displayed to the user in human-readable form.

Part 2 of Mailsploit mitigation.

* src/engine/rfc822/rfc822-message.vala (Message): Since GMime.Message's
  convenience properties for accessing header values such as senders,
  recipients, etc. in string form are presented as human-readable, not
  RFC822 compliant strings, we can't re-parse them for use by this class
  when it is being constructed from a GMime-based source. Instead,
  iterate over all headers to get the raw values and parse those we are
  interested in instead. Add unit tests.

* src/engine/rfc822/rfc822-mailbox-address.vala (BaseObject): Add gmime
  constructor so we can handle construction and decoding from a GMime
  InternetAddressMailbox object in a consistent way. Ensure both names
  are decoded correctly, and mailboxes are decoded at all, from both
  GMime and IMAP sources. If a GMime source's address has no @-symbol,
  try to decode the whole thing first it in case the whole address is
  encoded. Add unit tests.

* src/engine/rfc822/rfc822-mailbox-addresses.vala (MailboxAddresses):
  Add append method and handle group addresses here instead of in Message
  to simplify updated Message implementation.

* src/engine/rfc822/rfc822-message-data.vala (MessageData): Add append
  method to simplify updated Message implementation.
2018-01-31 16:15:29 +10:30
Michael James Gratton
f10f898ab0 Always use UTF-8 for encoding non-ASCII/ISO-8859-1 headers. Bug 753870.
While message bodies are always sent as UTF-8, non ASCII/ISO-8859-1
headers were being encoded using GMime's default heuristics. This
uses some less-well-supported charsets and causing some rendering
issues in other less tolerant client.

Since we assume UTF-8 support for the body, assume it for headers as
well.

* src/engine/rfc822/rfc822.vala (Geary.RFC822.init): Set GMime user
  charsets to UTF-8.

* bindings/vapi/gmime-2.6.vapi (GMime): Fix binding for
  g_mime_set_user_charsets.
2016-06-30 15:29:39 +10:00
Jim Nelson
f1c75fc465 Patch major memory leak due to GMime bindings
Discovered a few binding problems while working on another issue,
in particular gmime_parser_construct_message()'s return object
not being freed, which can hold an entire message (attachments and
all) in memory.
2014-07-30 19:02:11 -07:00
Jim Nelson
0eb0a2d6e6 Some date-related fixes 2014-05-12 15:44:22 -07:00
Jim Nelson
7c7c4fec02 Fix memory leaks due to GMime bindings
Includes regen'd VAPI.
2014-01-06 17:59:10 -08:00
Jim Nelson
e29a9c801a Convert all MIME handling to Engine classes: Closes #6530
We've had numerous bugs due to improper MIME comparisons and dealing
with Content-Type and Content-Disposition (or their lack of presence
in a message).  Now the Engine offers MIME classes that better deal
with these issues without exporting the GMime structures, which
are not as easy to manage and don't offer some of the things that
have bitten us in the past (such as case-insensitive comparisons).
2013-11-15 17:39:00 -08:00
Jim Nelson
9a8f96310c Save inline images displayed via MIME Content-ID: Closes #7475
Some reorganization of how data: URIs are assembled and injected
into the document.

Also, mild improvement to the GMime bindings.
2013-09-11 19:21:44 -07:00
Robert Schroll
844963ed0e Forward attached emails properly: Closes #6842
This fix required adapting a filter from GMime, which is also
licensed LGPL 2.1.  A GMime VAPI change was also required.
2013-05-13 16:24:11 -07:00
Jim Nelson
667e2dcf32 Fix Gmime bindings: Closes #6582 2013-03-16 16:19:25 -07:00
Eric Gregory
3467c72035 Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
Squashed commit of the following:

commit 6e066374da45dd602ee1ca3c9bc5f77b9411b6f4
Author: Eric Gregory <eric@yorba.org>
Date:   Tue Jan 15 11:36:32 2013 -0800

    Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
2013-01-15 13:04:30 -08:00
Renamed from vapi/gmime-2.6.vapi (Browse further)