diff -Nru evolution-exchange-2.22.2/calendar/e-cal-backend-exchange.c evolution-exchange-2.22.3/calendar/e-cal-backend-exchange.c --- evolution-exchange-2.22.2/calendar/e-cal-backend-exchange.c 2008-05-23 13:23:45.000000000 +0200 +++ evolution-exchange-2.22.3/calendar/e-cal-backend-exchange.c 2008-01-16 05:48:18.000000000 +0100 @@ -621,6 +621,9 @@ d(printf("ecbe_add_object(%p, %s, %s)\n", cbex, href, lastmod)); uid = icalcomponent_get_uid (comp); + if (!uid) + return FALSE; + ecomp = g_hash_table_lookup (cbex->priv->objects, uid); is_instance = (icalcomponent_get_first_property (comp, ICAL_RECURRENCEID_PROPERTY) != NULL); @@ -721,6 +724,9 @@ FALSE); uid = icalcomponent_get_uid (comp); + if (!uid) + return FALSE; + rid = icalcomponent_get_recurrenceid (comp); ecomp = g_hash_table_lookup (cbex->priv->objects, uid); @@ -808,6 +814,9 @@ { ECalBackendExchangeComponent *ecomp; + if (!uid) + return NULL; + ecomp = g_hash_table_lookup (cbex->priv->objects, uid); if (ecomp) return ecomp; @@ -1952,6 +1961,15 @@ return g_hash_table_lookup (cbex->priv->timezones, tzid); } +icaltimezone * +e_cal_backend_exchange_lookup_timezone (const char *tzid, + const void *custom, + GError **error) +{ + return internal_get_timezone (E_CAL_BACKEND ((ECalBackendExchange *)custom), + tzid); +} + static void free_exchange_comp (gpointer value) diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/calendar/e-cal-backend-exchange-calendar.c /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/calendar/e-cal-backend-exchange-calendar.c --- evolution-exchange-2.22.2/calendar/e-cal-backend-exchange-calendar.c 2008-04-04 11:18:43.000000000 +0200 +++ evolution-exchange-2.22.3/calendar/e-cal-backend-exchange-calendar.c 2008-01-16 05:48:18.000000000 +0100 @@ -25,6 +25,8 @@ #include #include +#include + #include "e-cal-backend-exchange-calendar.h" #include "e2k-cal-utils.h" @@ -64,6 +66,8 @@ gboolean check_for_send_options (icalcomponent *icalcomp, E2kProperties *props); static void update_x_properties (ECalBackendExchange *cbex, ECalComponent *comp); + + static void add_timezones_from_comp (ECalBackendExchange *cbex, icalcomponent *icalcomp) { @@ -196,6 +200,8 @@ GSList *attachment_list = NULL; gboolean status; ECalBackend *backend = E_CAL_BACKEND (cbex); + GError *error = NULL; + gboolean retval = TRUE; /* Check for attachments */ if (uid) @@ -216,6 +222,11 @@ if (!icalcomp) return FALSE; + if (!icalcomponent_get_uid (icalcomp)) { + icalcomponent_free (icalcomp); + return FALSE; + } + kind = icalcomponent_isa (icalcomp); if (kind == ICAL_VEVENT_COMPONENT) { if (receipts) { @@ -243,12 +254,20 @@ icalcomponent_free (icalcomp); return status; } else if (kind != ICAL_VCALENDAR_COMPONENT) { - icalcomponent_free (icalcomp); - if (attachment_list) { - g_slist_foreach (attachment_list, (GFunc) g_free, NULL); - g_slist_free (attachment_list); - } - return FALSE; + retval = FALSE; + goto cleanup; + } + + /* map time zones against system time zones and handle conflicting definitions */ + if (!e_cal_check_timezones (icalcomp, + NULL, + e_cal_backend_exchange_lookup_timezone, + cbex, + &error)) { + g_warning ("checking timezones failed: %s", error->message); + g_clear_error (&error); + retval = FALSE; + goto cleanup; } add_timezones_from_comp (cbex, icalcomp); @@ -280,13 +299,15 @@ subcomp = icalcomponent_get_next_component ( icalcomp, ICAL_VEVENT_COMPONENT); } + + cleanup: icalcomponent_free (icalcomp); if (attachment_list) { g_slist_foreach (attachment_list, (GFunc) g_free, NULL); g_slist_free (attachment_list); } - return TRUE; + return retval; } static const char *event_properties[] = { @@ -1558,6 +1579,7 @@ icalproperty_method method; icalcomponent *subcomp, *icalcomp; ECalBackendSyncStatus status = GNOME_Evolution_Calendar_Success; + GError *error = NULL; d(printf ("ecbexc_modify_object(%p, %p, %s)", backend, cal, calobj ? calobj : NULL)); cbexc = E_CAL_BACKEND_EXCHANGE_CALENDAR (backend); @@ -1577,6 +1599,20 @@ return GNOME_Evolution_Calendar_InvalidObject; icalcomp = icalparser_parse_string (calobj); + + /* map time zones against system time zones and handle conflicting definitions */ + if (icalcomp && + !e_cal_check_timezones (icalcomp, + comps, + e_cal_backend_exchange_lookup_timezone, + cbex, + &error)) { + g_warning ("checking timezones failed: %s", error->message); + icalcomponent_free (icalcomp); + g_clear_error (&error); + return GNOME_Evolution_Calendar_InvalidObject; + } + add_timezones_from_comp (E_CAL_BACKEND_EXCHANGE (backend), icalcomp); icalcomponent_free (icalcomp); @@ -1972,10 +2008,11 @@ ECalBackendExchange *cbex = (ECalBackendExchange *) backend; ECalBackendSyncStatus retval = GNOME_Evolution_Calendar_Success; ECalBackendExchangeBookingResult result; - ECalComponent *comp; - icalcomponent *top_level, *icalcomp, *tzcomp; + ECalComponent *comp = NULL; + icalcomponent *top_level = NULL, *icalcomp, *tzcomp; icalproperty *prop; icalproperty_method method; + GError *error = NULL; g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE (cbex), GNOME_Evolution_Calendar_InvalidObject); @@ -1988,6 +2025,20 @@ *modified_calobj = NULL; top_level = icalparser_parse_string (calobj); + + /* map time zones against system time zones and handle conflicting definitions */ + if (top_level && + !e_cal_check_timezones (top_level, + NULL, + e_cal_backend_exchange_lookup_timezone, + cbex, + &error)) { + g_warning ("checking timezones failed: %s", error->message); + g_clear_error (&error); + retval = FALSE; + goto cleanup; + } + icalcomp = icalcomponent_new_clone (icalcomponent_get_inner (top_level)); comp = e_cal_component_new (); @@ -2003,13 +2054,7 @@ } /* traverse all timezones to add them to the backend */ - tzcomp = icalcomponent_get_first_component (top_level, - ICAL_VTIMEZONE_COMPONENT); - while (tzcomp) { - e_cal_backend_exchange_add_timezone (cbex, tzcomp); - tzcomp = icalcomponent_get_next_component (top_level, - ICAL_VTIMEZONE_COMPONENT); - } + add_timezones_from_comp (cbex, top_level); for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); prop != NULL; @@ -2078,8 +2123,12 @@ *modified_calobj = g_strdup (e_cal_component_get_as_string (comp)); cleanup: - icalcomponent_free (top_level); - g_object_unref (comp); + if (top_level) { + icalcomponent_free (top_level); + } + if (comp) { + g_object_unref (comp); + } return retval; } diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/calendar/e-cal-backend-exchange.h /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/calendar/e-cal-backend-exchange.h --- evolution-exchange-2.22.2/calendar/e-cal-backend-exchange.h 2008-04-04 11:18:43.000000000 +0200 +++ evolution-exchange-2.22.3/calendar/e-cal-backend-exchange.h 2008-01-16 05:48:18.000000000 +0100 @@ -80,6 +80,12 @@ ECalBackendSyncStatus get_timezone (ECalBackendSync *backend, EDataCal *cal, const char *tzid, char **object); +/** lookup function for e_cal_check_timezones() */ +icaltimezone * +e_cal_backend_exchange_lookup_timezone (const char *tzid, + const void *custom, + GError **error); + ECalBackendExchangeComponent * get_exchange_comp (ECalBackendExchange *cbex, const char *uid); diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/ChangeLog /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/ChangeLog --- evolution-exchange-2.22.2/ChangeLog 2008-05-26 13:51:14.000000000 +0200 +++ evolution-exchange-2.22.3/ChangeLog 2008-06-30 08:06:04.000000000 +0200 @@ -1,13 +1,58 @@ +2008-06-30 Srinivasa Ragavan + + * NEWS, configure.in: Evolution Exchange 2.22.3 release. + +2008-06-22 Patrick Ohly + + * calendar/e-cal-backend-exchange-calendar.c, + calendar/e-cal-backend-exchange.c, + calendar/e-cal-backend-exchange.h: Use e_cal_check_timezones() to + match time zone definitions and handle conflicting definitions; + requires a new utility function to look up time zone definitions + cached in the backend (bug #52890). + +2008-06-13 Milan Crha + + ** Fix for bug #402752 + + * calendar/e-cal-backend-exchange.c: (get_exchange_comp), + (e_cal_backend_exchange_add_object), + (e_cal_backend_exchange_modify_object): + * calendar/e-cal-backend-exchange-calendar.c: (add_ical): + Prevent crash when got a component without set UID. + +2008-06-07 Paul Smith + + ** Fix for bug #532844 + + * mail/mail-stub-exchange.c (get_message): If it's a bad case we can + just goto the error handling code instead of trying to process the + response. + 2008-05-26 Srinivasa Ragavan * NEWS, configure.in: Evolution Exchange 2.22.2 release. -2008-05-20 Chenthill Palanisamy +2008-05-26 Johnny Jacob + + ** Fix for Bug #533422 + * storage/Makefile.am (EXTRA_DIST): server_DATA should not + be packed in dist tarballs. + +2008-05-20 Chenthill Palanisamy + Downstream fix for bug #203481 (bnc) * calendar/e-cal-backend-exchange-tasks.c: (receive_task_objects): Fix the conflict in local variables. +2008-05-23 Øystein Gisnås + + ** Fix for bug #366250 + + * configure.in: Don't compile/package semi-free RFCs and other IETF + documents that are easily accessible on the web. + 2008-05-13 Matthew Barnes ** Fix for bug #523023 diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/configure /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/configure --- evolution-exchange-2.22.2/configure 2008-05-25 13:22:13.000000000 +0200 +++ evolution-exchange-2.22.3/configure 2008-06-29 08:24:01.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for evolution-exchange 2.22.2. +# Generated by GNU Autoconf 2.61 for evolution-exchange 2.22.3. # # Report bugs to . # @@ -728,8 +728,8 @@ # Identity of this package. PACKAGE_NAME='evolution-exchange' PACKAGE_TARNAME='evolution-exchange' -PACKAGE_VERSION='2.22.2' -PACKAGE_STRING='evolution-exchange 2.22.2' +PACKAGE_VERSION='2.22.3' +PACKAGE_STRING='evolution-exchange 2.22.3' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution%20Exchange' ac_unique_file="storage" @@ -1510,7 +1510,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures evolution-exchange 2.22.2 to adapt to many kinds of systems. +\`configure' configures evolution-exchange 2.22.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1580,7 +1580,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of evolution-exchange 2.22.2:";; + short | recursive ) echo "Configuration of evolution-exchange 2.22.3:";; esac cat <<\_ACEOF @@ -1730,7 +1730,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -evolution-exchange configure 2.22.2 +evolution-exchange configure 2.22.3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1744,7 +1744,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by evolution-exchange $as_me 2.22.2, which was +It was created by evolution-exchange $as_me 2.22.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2435,7 +2435,7 @@ # Define the identity of the package. PACKAGE=evolution-exchange - VERSION=2.22.2 + VERSION=2.22.3 cat >>confdefs.h <<_ACEOF @@ -26881,7 +26881,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by evolution-exchange $as_me 2.22.2, which was +This file was extended by evolution-exchange $as_me 2.22.3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26934,7 +26934,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -evolution-exchange config.status 2.22.2 +evolution-exchange config.status 2.22.3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/configure.in /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/configure.in --- evolution-exchange-2.22.2/configure.in 2008-05-25 12:37:31.000000000 +0200 +++ evolution-exchange-2.22.3/configure.in 2008-06-29 07:40:28.000000000 +0200 @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT(evolution-exchange, 2.22.2, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution%20Exchange) +AC_INIT(evolution-exchange, 2.22.3, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution%20Exchange) AC_CONFIG_SRCDIR(storage) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/debian/changelog /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/debian/changelog --- evolution-exchange-2.22.2/debian/changelog 2008-07-03 17:50:33.000000000 +0200 +++ evolution-exchange-2.22.3/debian/changelog 2008-07-03 17:50:33.000000000 +0200 @@ -1,3 +1,15 @@ +evolution-exchange (2.22.3-0ubuntu1) hardy-proposed; urgency=low + + * New upstream version: + Bug fixes: + - #402752: Prevent crash when got a component without set UID + - #528902: Evolution's time zone handling fails to handle the fact that + time zone definitions can change + - #532844: If it's a bad case we can just goto the error handling code + instead of trying to process the response. (lp: #236781) + + -- Sebastien Bacher Thu, 03 Jul 2008 17:33:31 +0200 + evolution-exchange (2.22.2-0ubuntu1) hardy-proposed; urgency=low * New upstream versions (lp: #235081): diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/mail/mail-stub-exchange.c /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/mail/mail-stub-exchange.c --- evolution-exchange-2.22.2/mail/mail-stub-exchange.c 2008-04-04 11:18:33.000000000 +0200 +++ evolution-exchange-2.22.3/mail/mail-stub-exchange.c 2008-01-16 05:48:18.000000000 +0100 @@ -2438,18 +2438,20 @@ if (mfld->type == MAIL_STUB_EXCHANGE_FOLDER_NOTES) { status = get_stickynote (mse->ctx, NULL, mmsg->href, &body, &len); + if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) + goto error; content_type = g_strdup ("message/rfc822"); } else { SoupBuffer *response; status = e2k_context_get (mse->ctx, NULL, mmsg->href, &content_type, &response); + if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) + goto error; len = response->length; body = g_strndup (response->data, response->length); soup_buffer_free (response); } - if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) - goto error; /* Public folders especially can contain non-email objects. * In that case, we fake the headers (which in this case diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/NEWS /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/NEWS --- evolution-exchange-2.22.2/NEWS 2008-05-26 13:50:12.000000000 +0200 +++ evolution-exchange-2.22.3/NEWS 2008-06-30 08:05:37.000000000 +0200 @@ -1,3 +1,11 @@ +Evolution Exchange 2.22.3 2008-06-30 +------------------------------------ + +Bug fixes: + #402752: Prevent crash when got a component without set UID (Milan Crha) + #528902: Evolution's time zone handling fails to handle the fact that time zone definitions can change (Patrick Ohly) + #532844: If it's a bad case we can just goto the error handling code instead of trying to process the response. (Paul Smith) + Evolution Exchange 2.22.2 2008-05-26 ------------------------------------ diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/storage/GNOME_Evolution_Exchange_Storage_2.22.server /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/storage/GNOME_Evolution_Exchange_Storage_2.22.server --- evolution-exchange-2.22.2/storage/GNOME_Evolution_Exchange_Storage_2.22.server 2008-05-25 07:40:03.000000000 +0200 +++ evolution-exchange-2.22.3/storage/GNOME_Evolution_Exchange_Storage_2.22.server 1970-01-01 01:00:00.000000000 +0100 @@ -1,425 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/storage/Makefile.am /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/storage/Makefile.am --- evolution-exchange-2.22.2/storage/Makefile.am 2008-04-04 11:18:42.000000000 +0200 +++ evolution-exchange-2.22.3/storage/Makefile.am 2008-01-16 05:48:18.000000000 +0100 @@ -114,7 +114,6 @@ EXTRA_DIST = \ $(server_in_files) \ - $(server_DATA) \ $(images_DATA) \ $(glade_DATA) \ $(ui_DATA) diff -Nru /tmp/rIUKhHGGWC/evolution-exchange-2.22.2/storage/Makefile.in /tmp/RuvNwbTvuj/evolution-exchange-2.22.3/storage/Makefile.in --- evolution-exchange-2.22.2/storage/Makefile.in 2008-05-25 13:22:16.000000000 +0200 +++ evolution-exchange-2.22.3/storage/Makefile.in 2008-06-29 08:24:04.000000000 +0200 @@ -397,7 +397,6 @@ EXTRA_DIST = \ $(server_in_files) \ - $(server_DATA) \ $(images_DATA) \ $(glade_DATA) \ $(ui_DATA)