From b79f127aba61417e1200dec8daed50ec5abfd062 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 29 2020 07:07:25 +0000 Subject: import evolution-ews-3.28.5-6.el7 --- diff --git a/SOURCES/evolution-ews-3.28.5-save-only-if-organizer.patch b/SOURCES/evolution-ews-3.28.5-save-only-if-organizer.patch new file mode 100644 index 0000000..5085cff --- /dev/null +++ b/SOURCES/evolution-ews-3.28.5-save-only-if-organizer.patch @@ -0,0 +1,75 @@ +diff -up evolution-ews-3.28.5/src/calendar/e-cal-backend-ews.c.save-only-if-organizer evolution-ews-3.28.5/src/calendar/e-cal-backend-ews.c +--- evolution-ews-3.28.5/src/calendar/e-cal-backend-ews.c.save-only-if-organizer 2019-11-13 07:44:37.295278517 +0100 ++++ evolution-ews-3.28.5/src/calendar/e-cal-backend-ews.c 2019-11-13 07:55:27.656269523 +0100 +@@ -147,6 +147,41 @@ ecb_ews_get_collection_settings (ECalBac + return CAMEL_EWS_SETTINGS (settings); + } + ++static GHashTable * ++ecb_ews_get_mail_aliases (ECalBackendEws *cbews) ++{ ++ ESource *source; ++ ESourceRegistry *registry; ++ GHashTable *aliases = NULL; ++ GList *identities, *link; ++ const gchar *parent_uid; ++ ++ source = e_backend_get_source (E_BACKEND (cbews)); ++ parent_uid = e_source_get_parent (source); ++ ++ if (!parent_uid || !*parent_uid) ++ return NULL; ++ ++ registry = e_cal_backend_get_registry (E_CAL_BACKEND (cbews)); ++ identities = e_source_registry_list_enabled (registry, E_SOURCE_EXTENSION_MAIL_IDENTITY); ++ ++ for (link = identities; link; link = g_list_next (link)) { ++ ESource *mail_identity = link->data; ++ ++ if (g_strcmp0 (parent_uid, e_source_get_parent (mail_identity)) == 0) { ++ ESourceMailIdentity *extension; ++ ++ extension = e_source_get_extension (mail_identity, E_SOURCE_EXTENSION_MAIL_IDENTITY); ++ aliases = e_source_mail_identity_get_aliases_as_hash_table (extension); ++ break; ++ } ++ } ++ ++ g_list_free_full (identities, g_object_unref); ++ ++ return aliases; ++} ++ + static void + ecb_ews_convert_error_to_edc_error (GError **perror) + { +@@ -1350,6 +1385,18 @@ ecb_ews_is_organizer (ECalBackendEws *cb + is_organizer = user_email && g_ascii_strcasecmp (email, user_email) == 0; + + g_free (user_email); ++ ++ if (!is_organizer) { ++ GHashTable *aliases; ++ ++ aliases = ecb_ews_get_mail_aliases (cbews); ++ ++ if (aliases) { ++ is_organizer = g_hash_table_contains (aliases, email); ++ ++ g_hash_table_unref (aliases); ++ } ++ } + } + + return is_organizer; +@@ -2595,6 +2642,10 @@ ecb_ews_save_component_sync (ECalMetaBac + g_slist_free_full (existing, g_object_unref); + g_slist_free_full (changed_instances, change_data_free); + g_slist_free_full (removed_instances, g_object_unref); ++ } else if (e_cal_component_has_organizer (master) && ++ !ecb_ews_is_organizer (cbews, master)) { ++ success = FALSE; ++ g_propagate_error (error, EDC_ERROR_EX (PermissionDenied, _("Cannot create meetings organized by other users in an Exchange Web Services calendar."))); + } else { + GHashTable *removed_indexes; + EwsCalendarConvertData convert_data = { 0 }; diff --git a/SPECS/evolution-ews.spec b/SPECS/evolution-ews.spec index 582e60f..6a435c5 100644 --- a/SPECS/evolution-ews.spec +++ b/SPECS/evolution-ews.spec @@ -2,7 +2,7 @@ Name: evolution-ews Version: 3.28.5 -Release: 5%{?dist} +Release: 6%{?dist} Group: Applications/Productivity Summary: Evolution extension for Exchange Web Services License: LGPLv2 @@ -34,6 +34,9 @@ Patch07: evolution-ews-3.28.5-cve-2019-3890.patch # RH bug #1392567 Patch08: evolution-ews-3.28.5-sync-category-list.patch +# RH bug #1764669 +Patch09: evolution-ews-3.28.5-save-only-if-organizer.patch + Requires: evolution >= %{eds_evo_version} Requires: evolution-data-server >= %{eds_evo_version} Requires: %{name}-langpacks = %{version}-%{release} @@ -80,6 +83,7 @@ This package contains translations for %{name}. %patch06 -p1 -b .double-collection-backend-populate %patch07 -p1 -b .cve-2019-3890 %patch08 -p1 -b .sync-category-list +%patch09 -p1 -b .save-only-if-organizer %build @@ -120,6 +124,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %files langpacks -f _build/%{name}.lang %changelog +* Tue May 05 2020 Milan Crha - 3.28.5-6 +- Add patch for RH bug #1764669 (Reject creating meetings organized by other users) + * Tue Oct 29 2019 Milan Crha - 3.28.5-5 - Remove patch for RH bug #1764669 (Send meeting change notifications only if being the organizer)