aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/evolution-CVE-2020-11879.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/evolution-CVE-2020-11879.patch')
-rw-r--r--gnu/packages/patches/evolution-CVE-2020-11879.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/gnu/packages/patches/evolution-CVE-2020-11879.patch b/gnu/packages/patches/evolution-CVE-2020-11879.patch
new file mode 100644
index 0000000000..8c85895aab
--- /dev/null
+++ b/gnu/packages/patches/evolution-CVE-2020-11879.patch
@@ -0,0 +1,122 @@
+From 6489f20d6905cc797e2b2581c415e558c457caa7 Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Wed, 12 Feb 2020 18:59:52 +0100
+Subject: [PATCH] I#784 - Warn about and limit what can be attached using
+ mailto: URI
+
+Closes https://gitlab.gnome.org/GNOME/evolution/issues/784
+---
+ src/composer/e-msg-composer.c | 58 +++++++++++++++++++++++++++++------
+ src/e-util/e-system.error.xml | 7 ++++-
+ 2 files changed, 54 insertions(+), 11 deletions(-)
+
+diff --git a/src/composer/e-msg-composer.c b/src/composer/e-msg-composer.c
+index e4c9ac095e..cd3168d882 100644
+--- a/src/composer/e-msg-composer.c
++++ b/src/composer/e-msg-composer.c
+@@ -4761,7 +4761,8 @@ handle_mailto (EMsgComposer *composer,
+ gchar *header, *content, *buf;
+ gsize nread, nwritten;
+ const gchar *p;
+- gint len, clen;
++ gint len, clen, has_attachments = 0;
++ gboolean has_blacklisted_attachment = FALSE;
+
+ table = e_msg_composer_get_header_table (composer);
+ view = e_msg_composer_get_attachment_view (composer);
+@@ -4844,22 +4845,36 @@ handle_mailto (EMsgComposer *composer,
+ } else if (!g_ascii_strcasecmp (header, "attach") ||
+ !g_ascii_strcasecmp (header, "attachment")) {
+ EAttachment *attachment;
++ GFile *file;
+
+ camel_url_decode (content);
+- if (file_is_blacklisted (content))
+- e_alert_submit (
+- E_ALERT_SINK (e_msg_composer_get_editor (composer)),
+- "mail:blacklisted-file",
+- content, NULL);
+ if (g_ascii_strncasecmp (content, "file:", 5) == 0)
+ attachment = e_attachment_new_for_uri (content);
+ else
+ attachment = e_attachment_new_for_path (content);
+- e_attachment_store_add_attachment (store, attachment);
+- e_attachment_load_async (
+- attachment, (GAsyncReadyCallback)
+- e_attachment_load_handle_error, composer);
++ file = e_attachment_ref_file (attachment);
++ if (!file || !g_file_peek_path (file) ||
++ !g_file_test (g_file_peek_path (file), G_FILE_TEST_EXISTS) ||
++ g_file_test (g_file_peek_path (file), G_FILE_TEST_IS_DIR)) {
++ /* Do nothing, simply ignore the attachment request */
++ } else {
++ has_attachments++;
++
++ if (file_is_blacklisted (content)) {
++ has_blacklisted_attachment = TRUE;
++ e_alert_submit (
++ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
++ "mail:blacklisted-file",
++ content, NULL);
++ }
++
++ e_attachment_store_add_attachment (store, attachment);
++ e_attachment_load_async (
++ attachment, (GAsyncReadyCallback)
++ e_attachment_load_handle_error, composer);
++ }
+ g_object_unref (attachment);
++ g_clear_object (&file);
+ } else if (!g_ascii_strcasecmp (header, "from")) {
+ /* Ignore */
+ } else if (!g_ascii_strcasecmp (header, "reply-to")) {
+@@ -4883,6 +4898,29 @@ handle_mailto (EMsgComposer *composer,
+
+ g_free (buf);
+
++ if (has_attachments && !has_blacklisted_attachment) {
++ const gchar *primary;
++ gchar *secondary;
++
++ primary = g_dngettext (GETTEXT_PACKAGE,
++ "Review attachment before sending.",
++ "Review attachments before sending.",
++ has_attachments);
++
++ secondary = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
++ "There had been added %d attachment. Make sure it does not contain any sensitive information before sending the message.",
++ "There had been added %d attachments. Make sure they do not contain any sensitive information before sending the message.",
++ has_attachments),
++ has_attachments);
++
++ e_alert_submit (
++ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
++ "system:generic-warning",
++ primary, secondary, NULL);
++
++ g_free (secondary);
++ }
++
+ merge_always_cc_and_bcc (table, to, &cc, &bcc);
+
+ tov = destination_list_to_vector (to);
+diff --git a/src/e-util/e-system.error.xml b/src/e-util/e-system.error.xml
+index ddcf989fda..02facb7d26 100644
+--- a/src/e-util/e-system.error.xml
++++ b/src/e-util/e-system.error.xml
+@@ -1,6 +1,11 @@
+ <?xml version="1.0"?>
+ <error-list domain="system">
+- <error type="error" id="generic-error">
++ <error id="generic-error" type="error">
++ <primary>{0}</primary>
++ <secondary>{1}</secondary>
++ </error>
++
++ <error id="generic-warning" type="warning">
+ <primary>{0}</primary>
+ <secondary>{1}</secondary>
+ </error>
+--
+GitLab
+
es/emulators.scm (higan): Likewise. * gnu/packages/engineering.scm (freehdl): Likewise. (librepcb): Likewise. * gnu/packages/entr.scm (entr): Likewise. * gnu/packages/file-systems.scm (libeatmydata): Likewise. (xfstests): Likewise. (mergerfs): Likewise. (mergerfs-tools): Likewise. * gnu/packages/finance.scm (monero-gui): Likewise. * gnu/packages/flashing-tools.scm (flashrom): Likewise. * gnu/packages/fontutils.scm (fontforge): Likewise. * gnu/packages/game-development.scm (python2-renpy): Likewise. * gnu/packages/games.scm (opensurge): Likewise. (xboard): Likewise. (hyperrogue): Likewise. (flare-game): Likewise. (chessx): Likewise. * gnu/packages/geo.scm (grass): Likewise. * gnu/packages/glib.scm (glib): Likewise. * gnu/packages/gnome.scm (mm-common): Likewise. (network-manager-openvpn): Likewise. (network-manager-vpnc): Likewise. (network-manager-openconnect): Likewise. (apostrophe): Likewise. * gnu/packages/gnupg.scm (pius): Likewise. (jetring): Likewise. * gnu/packages/gnuzilla.scm (icedove): Likewise. * gnu/packages/golang.scm (go-1.4): Likewise. * gnu/packages/graphviz.scm (xdot): Likewise. * gnu/packages/guile-xyz.scm (jupyter-guile-kernel): Likewise. * gnu/packages/haskell-xyz.scm (ghc-hindent): Likewise. * gnu/packages/ibus.scm (ibus): Likewise. * gnu/packages/image.scm (phockup): Likewise. * gnu/packages/irc.scm (quassel): Likewise. * gnu/packages/java.scm (drip): Likewise. (ant-bootstrap): Likewise. (tla2tools): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/less.scm (lesspipe): Likewise. * gnu/packages/libreoffice.scm (libreoffice): Likewise. * gnu/packages/linux.scm (fuse): Likewise. (lm-sensors): Likewise. (bluez): Likewise. (fakeroot): Likewise. (inputattach): Likewise. * gnu/packages/lisp-xyz.scm (sbcl-cl-diskspace): Likewise. * gnu/packages/lisp.scm (lisp-repl-core-dumper): Likewise. * gnu/packages/lua.scm (fennel): Likewise. * gnu/packages/lxde.scm (spacefm): Likewise. * gnu/packages/mail.scm (public-inbox): Likewise. * gnu/packages/maths.scm (hdf-java): Likewise. (maxima): Likewise. (frama-c): Likewise. * gnu/packages/messaging.scm (libgadu): Likewise. * gnu/packages/music.scm (denemo): Likewise. (curseradio): Likewise. * gnu/packages/netpbm.scm (netpbm): Likewise. * gnu/packages/networking.scm (blueman): Likewise. (squid): Likewise. (aircrack-ng): Likewise. * gnu/packages/node.scm (node): Likewise. (node-llparse-frontend-bootstrap): Likewise. (node-llparse-bootstrap): Likewise. (llhttp-bootstrap): Likewise. (node-lts): Likewise. * gnu/packages/ocaml.scm (ocaml-4.11): Likewise. (opam): Likewise. (ocaml-graph): Likewise. * gnu/packages/orpheus.scm (orpheus): Likewise. * gnu/packages/password-utils.scm (password-store): Likewise. * gnu/packages/python.scm (pypy3): Likewise. * gnu/packages/qt.scm (qt5ct): Likewise. * gnu/packages/radio.scm (libosmo-dsp): Likewise. * gnu/packages/ruby.scm (ruby-pandoc-ruby): Likewise. * gnu/packages/rust.scm (rust-1.30): Likewise. * gnu/packages/screen.scm (byobu): Likewise. * gnu/packages/statistics.scm (r-with-tests): Likewise. * gnu/packages/suckless.scm (surf): Likewise. * gnu/packages/syndication.scm (gfeeds): Likewise. * gnu/packages/telephony.scm (mumble): Likewise. * gnu/packages/terminals.scm (alacritty): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/packages/uml.scm (plantuml): Likewise. * gnu/packages/version-control.scm (python-git-multimail): Likewise. (gitolite): Likewise. (hg-commitsigs): Likewise. (git-when-merged): Likewise. (git-imerge): Likewise. (gita): Likewise. * gnu/packages/video.scm (you-get): Likewise. * gnu/packages/vim.scm (eovim): Likewise. * gnu/packages/virtualization.scm (qemu): Likewise. (virt-manager): Likewise. (criu): Likewise. * gnu/packages/vpn.scm (strongswan): Likewise. (xl2tpd): Likewise. * gnu/packages/wm.scm (i3lock-fancy): Likewise. * gnu/packages/wxwidgets.scm (python-wxpython): Likewise. (python2-wxpython): Likewise. * gnu/packages/xdisorg.scm (autorandr): Likewise. * gnu/packages/xorg.scm (hackneyed-x11-cursors): Likewise. (v86d): Likewise. (mkfontdir): Likewise. (xpra): Likewise. Ludovic Courtès 2021-07-24gnu: Use 'search-input-directory' when looking for tzdata....* gnu/packages/backup.scm (duplicity)[arguments]: Use 'search-input-directory' for "share/zoneinfo". * gnu/packages/bioinformatics.scm (pigx-rnaseq): Likewise. (pigx-bsseq): Likewise. * gnu/packages/calcurse.scm (calcurse): Likewise. * gnu/packages/calendar.scm (date): Likewise. * gnu/packages/compression.scm (lhasa): Likewise. * gnu/packages/cran.scm (r-rstan): Likewise. * gnu/packages/django.scm (python-django): Likewise. * gnu/packages/dlang.scm (ldc-bootstrap): Likewise. * gnu/packages/finance.scm (ledger): Likewise. * gnu/packages/glib.scm (glib): Likewise. * gnu/packages/golang.scm (go-1.4): Likewise. (go-1.14): Likewise. * gnu/packages/kde-frameworks.scm (kcalendarcore): Likewise. (kdelibs4support): Likewise. * gnu/packages/kodi.scm (kodi): Likewise. * gnu/packages/mail.scm (mu): Likewise. * gnu/packages/perl.scm (perl-libtime-parsedate): Likewise. * gnu/packages/python-xyz.scm (python-robotframework): Likewise. (python-dparse): Likewise. * gnu/packages/rrdtool.scm (rrdtool): Likewise. * gnu/packages/statistics.scm (r-with-tests): Likewise. * gnu/packages/vim.scm (vim): Likewise. * gnu/packages/virtualization.scm (ganeti): Likewise. * gnu/packages/vpn.scm (strongswan): Likewise. * gnu/packages/xfce.scm (xfce4-panel): Likewise. * gnu/packages/mate.scm (libmateweather): Use 'search-input-file' for "share/zoneinfo/zone.tab". Ludovic Courtès 2021-05-21gnu: Fix build for ldc....* gnu/packages/dlang.scm (ldc): Disable tests that use ptrace. Roel Janssen 2021-01-25gnu: ldc-bootstrap: Update to 0.17.6....* gnu/packages/dlang.scm (ldc-bootstrap): Update to 0.17.6. [arguments]: Remove 'patch-dmd2 phase. Enable one test from 'patch-phobos. [native-inputs]: Replace llvm-3.8, clang-3.8 with llvm-6, clang-6. Efraim Flashner