1. 16 Jan, 2019 1 commit
  2. 04 Jun, 2018 1 commit
  3. 19 May, 2018 1 commit
  4. 23 Apr, 2018 1 commit
  5. 31 Jan, 2018 1 commit
    • Michael Gratton's avatar
      Ensure encoded mailbox addresses are decoded correctly. · 8a1906fa
      Michael Gratton authored
      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.
      8a1906fa
  6. 19 Nov, 2017 1 commit
  7. 18 Nov, 2017 1 commit
    • Michael Gratton's avatar
      Include a back trace in problem report technical details. · bcca75f5
      Michael Gratton authored
      This adds a dependcy on libunwind for generating the back trace.
      
      * src/CMakeLists.txt: Require libunwind-generic package and libunwind
        VAPI. Update docs and debian/control with new dependencies.
      
      * src/engine/api/geary-problem-report.vala (ProblemReport): Generate a
        stack trace in the default constructor if an error is specified.
      
      * src/client/components/main-window-info-bar.vala
        (MainWindowInfoBar::format_details): Include stack trafe from problem
        report in output if present.
      
      * ui/main-window-info-bar.ui: Add a ScrolledWindow around the TextView
        since the details could now be quite large.
      
      * bindings/vapi/libunwind.vapi: Add bindings for libunwind courtesy
        Guillaume Poirier-Morency, add Error enum.
      bcca75f5
  8. 02 Nov, 2017 1 commit
  9. 26 Oct, 2017 1 commit
  10. 31 Jan, 2017 9 commits
    • Michael Gratton's avatar
      Reenable basic deceptive link highlighting. · 2b5f94da
      Michael Gratton authored
      * bindings/vapi/javascriptcore-4.0.vapi (Object::get_property): Fix
        return type.
      
      * src/client/conversation-viewer/conversation-message.vala (GtkTemplate):
        Hook up to new deceptive_link_clicked signal, remove old DOM-based
        implementation.
      
      * src/client/conversation-viewer/conversation-web-view.vala
        (ConversationWebView): Add new deceptive_link_clicked signal and
        DeceptiveText enum, listen for deceptiveLinkClicked JS message and fire
        signal when received.
      
      * src/client/util/util-webkit.vala (WebKitUtil): Add to_object util function.
      
      * src/engine/util/util-js.vala (Geary.JS): Add to_object and get_property
        util functions.
      
      * ui/conversation-web-view.js (ConversationPageState) Listen for link
        clicks, check for deceptive text and send message if found. Add unit
        tests for deceptive text check.
      
      * test/js/composer-page-state-test.vala: Move ::run_javascript to parent
        class so new ConversationPageStateTest class can use it, adapt call
        sites to different parent signature.
      2b5f94da
    • Michael Gratton's avatar
      Update Javascript memory management a bit. · 503ca3b4
      Michael Gratton authored
      * bindings/vapi/javascriptcore-4.0.vapi: Don't pretend JS.String will
        be unreff'ed by vala, it wont. Add JS.GlobalContext.retain, in case it
        wants to be used.
      
      * src/client/components/client-web-view.vala
        (ClientWebView::ClientWebView): JavascriptResult instances are unref'ed
        when unowned.
      503ca3b4
    • Michael Gratton's avatar
      Clean up JavaScriptCore VAPI, client and engine code. · 772b874d
      Michael Gratton authored
      * bindings/vapi/javascriptcore-4.0.vapi: Make JS objects match their JSC
        definitions: move JSValueFoo methods to JS.Value, etc. Update call
        sites.
      
      * src/client/util/util-webkit.vala: Move WebKit-specific common methods
        from ClientWebView here. Update call sites.
      
      * src/engine/util/util-js.vala: Move JSC-specific common methods from
        ClientWebView and ComposerPageStateTest here. Update call sites.
      
      * src/client/web-process/web-process-extension.vala: Check for and handle
        exceptions when calling JS code.
      
      * src/CMakeLists.txt: Add new source files, make WebKit VAPI generation
        and engine compilation depend on JSC.
      772b874d
    • Michael Gratton's avatar
      Fix JS error getting F=F text from ComposerWebView. Add JS unit tests. · 22de6b12
      Michael Gratton authored
      * ui/composer-web-view.js (ComposerPageState::resolveNesting): Apply JS
        RegExp globally, to match default GLib RegEx behaviour.
      
      * test/js/composer-page-state-test.vala: New tests covering generation of
        HTML and F=F text from JS ComposerPageState object.
      
      * test/CMakeLists.txt: Add the new test.
      
      * test/main.vala (main): Add a test suite for JS tests, add the new test
        to it.
      
      * src/client/components/client-web-view.vala (ClientWebView): Add a
        reason to the JSError domain for when a JS exception is thrown.
      
      * bindings/vapi/javascriptcore-4.0.vapi (JS::Context): Add JS.Type and
        some additional methods needed for the unit tests. Move most
        GlobalContext methods to Context so we can pass the lowest common
        demominator around.
      22de6b12
    • Michael Gratton's avatar
      Implement getting message selection for quoting and selection in WK2. · 5b8c68f5
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-web-view.vala
        (ConversationWebView): Remove has_selection method since we are
        using the signal to specify if a selection was found or not. Update
        call sites to use that.
        (ConversationWebView::get_selection_for_find,
        ConversationWebView::get_selection_for_quoting): Implement using calls
        to web process JS methods.
      
      * src/client/application/geary-controller.vala
        (GearyController::create_reply_forward_widget): If we have a possible
        message view to quote from, handle constructing the compser widget
        asynchronously, when we know if we have a quote or not.
      
      * src/client/conversation-viewer/conversation-viewer.vala:
        (ConversationViewer::on_find_mode_changed): Handle getting text
        selection for finds asynchonously.
      
      * src/client/components/client-web-view.vala
        (ClientWebView::get_string_result): New helper for getting string
        values from JS calls.
      
      * src/client/conversation-viewer/conversation-email.vala
        (ConversationEmail::get_selection_for_quoting,
        ConversationEmail::get_selection_for_find): Handxle errors when
        obtaining selections from a message view.
      
      * src/client/conversation-viewer/conversation-message.vala: Remove
        methods that were simply passed through to the web view anyway. Update
        call sies.
      
      * src/client/web-process/util-conversation.vala: Port all remaining
        functions to JS, remove.
      
      * bindings/vapi/javascriptcore-4.0.vapi: Add methods needed to get
        strings out of WebKit.JavascriptResult instances.
      
      * ui/conversation-web-view.js: Implement selection functions in JS, minor
        cleanup.
      5b8c68f5
    • Michael Gratton's avatar
      Enable accessing javascriptcore objects from web extensions. · 8d13bf19
      Michael Gratton authored
      * src/CMakeLists.txt: Also generate a custom Also generate a custom
        webkit2gtk-web-extension-4.0 VAPI that re-includes javascriptcore
        objects, so they can be access from the web extension.
      
      * bindings/metadata/WebKit2WebExtension-4.0-custom.vala,
        bindings/metadata/WebKit2WebExtension-4.0.metadata: Include in-tree
        metadata for web extension VAPI, update to all access to JS obejcts.
      
      * bindings/vapi/javascriptcore-4.0.vapi: Add a bunch of useful additional
        objects and method.
      8d13bf19
    • Michael Gratton's avatar
      3a3b5d0b
    • Michael Gratton's avatar
      Initial pass at getting the HTML document's height from the web process. · 26fe139e
      Michael Gratton authored
      * bindings/vapi/javascriptcore-4.0.vapi: Add some methods to
        GlobalContext for accessing JSValues as ints.
      
      * src/client/components/client-web-view.vala
        (ClientWebView): Hook up UserContentManager script messages handler and
        handler implementation for "preferredHeightChanged", update the new
        preferred_height prop on the class, and queue a resize. Hook those
        values up to the GTK allocation machinery.
        (ClientWebView::get_int_result): Convenience method for getting an int
        from a JavascriptResult.
        (ClientWebView::get_preferred_height): Report back values as reported
        by messages from the script handler.
        (ClientWebView::register_message_handler): Convenience method for
        registering script messages handlers.
      
      * src/client/conversation-viewer/conversation-web-view.vala
        (ConversationWebView): Remove now-redundant GTK allocation machinery.
      
      * ui/client-web-view.js: Post a message to preferredHeightChanged when
        the page is sorta-kinda loaded.
      26fe139e
    • Michael Gratton's avatar
      Depend on javascriptcore, generate webkit2 VAPI that uses it. · f51f55cd
      Michael Gratton authored
      This gives us a means of using JS objects returned by UserContentManager
      script messages directly from Vala.
      
      * bindings/metadata/WebKit2-4.0.metadata: Tweak standard webkit2 VAPI to
        re-include methods that return javascriptcore objects.
      
      * bindings/vapi/javascriptcore-4.0.vapi: Copy generated VAPI file into
        the tree, customise it so that it actually works.
      
      * src/CMakeLists.txt: Generate the custom webkit2 VAPI, depend on
        javascriptcore and include in-tree javascriptcore VAPI in the client
        build.
      
      * bindings/metadata/JSCore-3.0.metadata: Remove obsolete file.
      f51f55cd
  11. 18 Jul, 2016 1 commit
  12. 30 Jun, 2016 1 commit
    • Michael Gratton's avatar
      Always use UTF-8 for encoding non-ASCII/ISO-8859-1 headers. Bug 753870. · f10f898a
      Michael Gratton authored
      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.
      f10f898a
  13. 09 Jun, 2016 1 commit
    • Leonardo Robol's avatar
      Added support to change the spell-checking language. · cae4b443
      Leonardo Robol authored
      Bug 720335
      
      * src/client/composer/spell-check-popover.vala
        Implemented a GtkPopover allowing the user to select a
        subset of the currently installed dictionaries for the spell
        checking in the composer widget.
      
      * src/client/util/util-international-vala
        Added detection of installed dictionaries and proper
        translation of the available languages. This requires
        Enchant as an additional dependency.
      
      * src/client/application/geary-config.vala
        Added keys spell-check-visible-languages and
        spell-check-languages in GSettings.
      cae4b443
  14. 06 May, 2016 1 commit
  15. 06 Feb, 2015 1 commit
  16. 09 Oct, 2014 1 commit
  17. 31 Jul, 2014 1 commit
    • Jim Nelson's avatar
      Patch major memory leak due to GMime bindings · f1c75fc4
      Jim Nelson authored
      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.
      f1c75fc4
  18. 12 May, 2014 1 commit
  19. 05 Feb, 2014 1 commit
  20. 17 Jan, 2014 1 commit
  21. 07 Jan, 2014 1 commit
  22. 16 Nov, 2013 2 commits
    • Jim Nelson's avatar
      Convert all MIME handling to Engine classes: Closes #6530 · e29a9c80
      Jim Nelson authored
      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).
      e29a9c80
    • Jim Nelson's avatar
      Can't bld w/ Vala 0.22.1 WebKitGTK 2.2.2: Closes #7694, Closes #7695 · eed221bf
      Jim Nelson authored
      Two problems:
      
      (a) Vala 0.22.1 fixes a binding change in libnotify
      that has to be fixed but causes Geary to be unable to build on prior
      versions of Vala.  libnotify.vapi added to solve this problem.
      
      (b) New version of Vala appears to be more sensitive to detecting
      problems in .gir files.  Using our .metadata file to paper over these
      issues in WebKit-3.0.gir.
      eed221bf
  23. 12 Sep, 2013 1 commit
  24. 13 May, 2013 1 commit
  25. 24 Apr, 2013 1 commit
  26. 12 Apr, 2013 1 commit
  27. 11 Apr, 2013 1 commit
  28. 16 Mar, 2013 1 commit
  29. 15 Jan, 2013 1 commit
    • Eric Gregory's avatar
      Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to... · 3467c720
      Eric Gregory authored
      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
      3467c720