Hello community, here is the log from the commit of package epiphany for openSUSE:Factory checked in at 2019-06-13 23:02:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/epiphany (Old) and /work/SRC/openSUSE:Factory/.epiphany.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "epiphany" Thu Jun 13 23:02:38 2019 rev:164 rq:709384 version:3.32.3 Changes: -------- --- /work/SRC/openSUSE:Factory/epiphany/epiphany.changes 2019-05-05 21:22:07.201391712 +0200 +++ /work/SRC/openSUSE:Factory/.epiphany.new.4811/epiphany.changes 2019-06-13 23:02:41.059427958 +0200 @@ -1,0 +2,14 @@ +Tue Jun 11 23:11:12 UTC 2019 - Bjørn Lie <[email protected]> + +- Update to version 3.32.3: + + Fix preferences language button sensitivity. + + Fix crash opening preferences dialog in weird locales. + + Fix manage additional URLs web apps preference. + + Fix blob and data URIs in web apps. + + Fix migration permanently corrupting web apps if migrated + before main profile. + + Fix crashes when safe browsing database is recreated. + + Fix crash in downloads code. + + Fix critical when starting web apps. + +------------------------------------------------------------------- Old: ---- epiphany-3.32.2.tar.xz New: ---- epiphany-3.32.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ epiphany.spec ++++++ --- /var/tmp/diff_new_pack.7xKfXp/_old 2019-06-13 23:02:41.795427319 +0200 +++ /var/tmp/diff_new_pack.7xKfXp/_new 2019-06-13 23:02:41.807427309 +0200 @@ -17,7 +17,7 @@ Name: epiphany -Version: 3.32.2 +Version: 3.32.3 Release: 0 Summary: GNOME Web Browser License: GPL-3.0-or-later ++++++ epiphany-3.32.2.tar.xz -> epiphany-3.32.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/NEWS new/epiphany-3.32.3/NEWS --- old/epiphany-3.32.2/NEWS 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/NEWS 2019-06-12 00:41:04.000000000 +0200 @@ -1,3 +1,15 @@ +3.32.3 - June 11, 2019 +====================== + +- Fix preferences language button sensitivity (#279) +- Fix crash opening preferences dialog in weird locales (#545) +- Fix manage additional URLs web apps preference (#558) +- Fix blob and data URIs in web apps (#593) +- Fix migration permanently corrupting web apps if migrated before main profile (#713) +- Fix crashes when safe browsing database is recreated +- Fix crash in downloads code +- Fix critical when starting web apps + 3.32.2 - May 2, 2019 ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/embed/ephy-download.c new/epiphany-3.32.3/embed/ephy-download.c --- old/epiphany-3.32.2/embed/ephy-download.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/embed/ephy-download.c 2019-06-12 00:41:04.000000000 +0200 @@ -762,21 +762,21 @@ ephy_download = g_object_new (EPHY_TYPE_DOWNLOAD, NULL); - g_signal_connect (download, "notify::response", - G_CALLBACK (download_response_changed_cb), - ephy_download); - g_signal_connect (download, "decide-destination", - G_CALLBACK (download_decide_destination_cb), - ephy_download); - g_signal_connect (download, "created-destination", - G_CALLBACK (download_created_destination_cb), - ephy_download); - g_signal_connect (download, "finished", - G_CALLBACK (download_finished_cb), - ephy_download); - g_signal_connect (download, "failed", - G_CALLBACK (download_failed_cb), - ephy_download); + g_signal_connect_object (download, "notify::response", + G_CALLBACK (download_response_changed_cb), + ephy_download, 0); + g_signal_connect_object (download, "decide-destination", + G_CALLBACK (download_decide_destination_cb), + ephy_download, 0); + g_signal_connect_object (download, "created-destination", + G_CALLBACK (download_created_destination_cb), + ephy_download, 0); + g_signal_connect_object (download, "finished", + G_CALLBACK (download_finished_cb), + ephy_download, 0); + g_signal_connect_object (download, "failed", + G_CALLBACK (download_failed_cb), + ephy_download, 0); ephy_download->download = g_object_ref (download); g_object_set_data (G_OBJECT (download), "ephy-download-set", GINT_TO_POINTER (TRUE)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/embed/ephy-embed-utils.c new/epiphany-3.32.3/embed/ephy-embed-utils.c --- old/epiphany-3.32.2/embed/ephy-embed-utils.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/embed/ephy-embed-utils.c 2019-06-12 00:41:04.000000000 +0200 @@ -387,28 +387,6 @@ return ephy_string_get_host_name (address); } -gboolean -ephy_embed_utils_urls_have_same_origin (const char *a_url, - const char *b_url) -{ - SoupURI *a_uri, *b_uri; - gboolean retval = FALSE; - - a_uri = soup_uri_new (a_url); - if (!a_uri) - return retval; - - b_uri = soup_uri_new (b_url); - if (b_uri) { - retval = a_uri->host && b_uri->host && soup_uri_host_equal (a_uri, b_uri); - soup_uri_free (b_uri); - } - - soup_uri_free (a_uri); - - return retval; -} - void ephy_embed_utils_shutdown (void) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/embed/ephy-embed-utils.h new/epiphany-3.32.3/embed/ephy-embed-utils.h --- old/epiphany-3.32.2/embed/ephy-embed-utils.h 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/embed/ephy-embed-utils.h 2019-06-12 00:41:04.000000000 +0200 @@ -46,8 +46,6 @@ gboolean ephy_embed_utils_url_is_empty (const char *location); gboolean ephy_embed_utils_is_no_show_address (const char *address); char *ephy_embed_utils_get_title_from_address (const char *address); -gboolean ephy_embed_utils_urls_have_same_origin (const char *a_url, - const char *b_url); void ephy_embed_utils_shutdown (void); G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/lib/ephy-time-helpers.c new/epiphany-3.32.3/lib/ephy-time-helpers.c --- old/epiphany-3.32.2/lib/ephy-time-helpers.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/lib/ephy-time-helpers.c 2019-06-12 00:41:04.000000000 +0200 @@ -67,10 +67,11 @@ char * eel_strdup_strftime (const char *format, struct tm *time_pieces) { - GString *string; + g_autoptr(GString) string = NULL; const char *remainder, *percent; char code[4], buffer[512]; - char *piece, *result, *converted; + char *piece, *result; + g_autofree gchar *converted = NULL; size_t string_length; gboolean strip_leading_zeros, turn_leading_zeros_to_spaces; char modifier; @@ -79,13 +80,14 @@ /* Format could be translated, and contain UTF-8 chars, * so convert to locale encoding which strftime uses */ converted = g_locale_from_utf8 (format, -1, NULL, NULL, NULL); - g_assert (converted != NULL); + if (!converted) + converted = g_strdup (format); string = g_string_new (""); remainder = converted; /* Walk from % character to % character. */ - for (;; ) { + for (;;) { percent = strchr (remainder, '%'); if (percent == NULL) { g_string_append (string, remainder); @@ -197,9 +199,6 @@ /* Convert the string back into utf-8. */ result = g_locale_to_utf8 (string->str, -1, NULL, NULL, NULL); - g_string_free (string, TRUE); - g_free (converted); - return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/lib/ephy-web-app-utils.c new/epiphany-3.32.3/lib/ephy-web-app-utils.c --- old/epiphany-3.32.2/lib/ephy-web-app-utils.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/lib/ephy-web-app-utils.c 2019-06-12 00:41:04.000000000 +0200 @@ -374,46 +374,42 @@ const char *name, GdkPixbuf *icon) { - char *profile_dir; - char *desktop_file_path = NULL; + g_autofree char *app_file = NULL; + g_autofree char *profile_dir = NULL; + g_autofree char *desktop_file_path = NULL; /* If there's already a WebApp profile for the contents of this * view, do nothing. */ profile_dir = ephy_web_application_get_profile_directory (id); if (g_file_test (profile_dir, G_FILE_TEST_IS_DIR)) { g_warning ("Profile directory %s already exists", profile_dir); - goto out; + return NULL; } /* Create the profile directory, populate it. */ if (g_mkdir_with_parents (profile_dir, 488) == -1) { g_warning ("Failed to create directory %s", profile_dir); - goto out; + return NULL; } /* Skip migration for new web apps. */ ephy_profile_utils_set_migration_version_for_profile_dir (EPHY_PROFILE_MIGRATION_VERSION, profile_dir); /* Create an .app file. */ - g_autofree char *app_file = g_build_filename (profile_dir, ".app", NULL); + app_file = g_build_filename (profile_dir, ".app", NULL); int fd = g_open (app_file, O_WRONLY|O_CREAT|O_TRUNC, 0644); if (fd < 0) { - LOG ("Failed to create .app file: %s", g_strerror (errno)); - goto out; - } else { - close (fd); + g_warning ("Failed to create .app file: %s", g_strerror (errno)); + return NULL; } + close (fd); /* Create the deskop file. */ desktop_file_path = create_desktop_file (id, name, address, profile_dir, icon); if (desktop_file_path) ephy_web_application_initialize_settings (profile_dir); - out: - if (profile_dir) - g_free (profile_dir); - - return desktop_file_path; + return g_steal_pointer (&desktop_file_path); } char * @@ -759,14 +755,43 @@ g_free (name); } +static gboolean +urls_have_same_origin (const char *a_url, + const char *b_url) +{ + SoupURI *a_uri, *b_uri; + gboolean retval = FALSE; + + a_uri = soup_uri_new (a_url); + if (!a_uri) + return retval; + + b_uri = soup_uri_new (b_url); + if (b_uri) { + retval = a_uri->host && b_uri->host && soup_uri_host_equal (a_uri, b_uri); + soup_uri_free (b_uri); + } + + soup_uri_free (a_uri); + + return retval; +} + gboolean -ephy_web_application_is_uri_allowed (const char* uri) +ephy_web_application_is_uri_allowed (const char *uri) { + EphyWebApplication *webapp = ephy_web_application_for_profile_directory (ephy_profile_dir ()); SoupURI *request_uri; char **urls; guint i; gboolean matched = FALSE; + if (g_str_has_prefix (uri, "blob:") || g_str_has_prefix (uri, "data:")) + return TRUE; + + if (urls_have_same_origin (uri, webapp->url)) + return TRUE; + if (g_strcmp0 (uri, "about:blank") == 0) return TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/lib/ephy-web-app-utils.h new/epiphany-3.32.3/lib/ephy-web-app-utils.h --- old/epiphany-3.32.2/lib/ephy-web-app-utils.h 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/lib/ephy-web-app-utils.h 2019-06-12 00:41:04.000000000 +0200 @@ -67,7 +67,7 @@ void ephy_web_application_initialize_settings (const char *profile_directory); -gboolean ephy_web_application_is_uri_allowed (const char* uri); +gboolean ephy_web_application_is_uri_allowed (const char *uri); gboolean ephy_web_application_save (EphyWebApplication *app); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/lib/safe-browsing/ephy-gsb-storage.c new/epiphany-3.32.3/lib/safe-browsing/ephy-gsb-storage.c --- old/epiphany-3.32.2/lib/safe-browsing/ephy-gsb-storage.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/lib/safe-browsing/ephy-gsb-storage.c 2019-06-12 00:41:04.000000000 +0200 @@ -124,7 +124,9 @@ GError *error = NULL; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return; ephy_sqlite_connection_begin_transaction (self->db, &error); if (error) { @@ -139,7 +141,9 @@ GError *error = NULL; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return; ephy_sqlite_connection_commit_transaction (self->db, &error); if (error) { @@ -382,11 +386,12 @@ ephy_gsb_storage_clear_db (EphyGSBStorage *self) { g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (EPHY_IS_SQLITE_CONNECTION (self->db)); - ephy_sqlite_connection_close (self->db); - ephy_sqlite_connection_delete_database (self->db); - g_clear_object (&self->db); + if (self->db) { + ephy_sqlite_connection_close (self->db); + ephy_sqlite_connection_delete_database (self->db); + g_clear_object (&self->db); + } } static gboolean @@ -408,6 +413,8 @@ if (!success) ephy_gsb_storage_clear_db (self); + self->is_operable = success; + return success; } @@ -498,11 +505,9 @@ success = ephy_gsb_storage_open_db (self); if (success && !ephy_gsb_storage_check_schema_version (self)) { LOG ("GSB database schema incompatibility, recreating database..."); - success = ephy_gsb_storage_recreate_db (self); + ephy_gsb_storage_recreate_db (self); } } - - self->is_operable = success; } static void @@ -627,9 +632,11 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (key); + if (!self->is_operable) + return; + sql = "UPDATE metadata SET value=? WHERE key=?"; statement = ephy_sqlite_connection_create_statement (self->db, sql, &error); if (error) { @@ -686,7 +693,9 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return NULL; sql = "SELECT threat_type, platform_type, threat_entry_type, client_state FROM threats"; statement = ephy_sqlite_connection_create_statement (self->db, sql, &error); @@ -742,9 +751,11 @@ gsize digest_len = GSB_HASH_SIZE; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); + if (!self->is_operable) + return NULL; + sql = "SELECT value FROM hash_prefix WHERE " "threat_type=? AND platform_type=? AND threat_entry_type=? " "ORDER BY value"; @@ -807,9 +818,11 @@ gboolean success; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); + if (!self->is_operable) + return; + if (clear) { sql = "UPDATE threats SET client_state=NULL " "WHERE threat_type=? AND platform_type=? AND threat_entry_type=?"; @@ -861,9 +874,11 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); + if (!self->is_operable) + return; + sql = "DELETE FROM hash_prefix WHERE " "threat_type=? AND platform_type=? AND threat_entry_type=?"; statement = ephy_sqlite_connection_create_statement (self->db, sql, &error); @@ -901,10 +916,12 @@ guint index = 0; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (indices); + if (!self->is_operable) + return NULL; + *num_prefixes = 0; sql = "SELECT value FROM hash_prefix WHERE " @@ -952,7 +969,9 @@ GString *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return NULL; sql = g_string_new ("DELETE FROM hash_prefix WHERE " "threat_type=? AND platform_type=? and threat_entry_type=? " @@ -985,10 +1004,12 @@ gboolean free_statement = TRUE; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (prefixes); + if (!self->is_operable) + return NULL; + if (stmt) { statement = stmt; ephy_sqlite_statement_reset (statement); @@ -1042,10 +1063,12 @@ gsize num_prefixes; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (indices); + if (!self->is_operable) + return; + LOG ("Deleting %lu hash prefixes...", num_indices); /* Move indices from the array to a hash table set. */ @@ -1105,10 +1128,12 @@ gsize num_indices; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (tes); + if (!self->is_operable) + return; + compression = json_object_get_string_member (tes, "compressionType"); if (!g_strcmp0 (compression, GSB_COMPRESSION_TYPE_RICE)) { rice_indices = json_object_get_object_member (tes, "riceIndices"); @@ -1137,7 +1162,9 @@ GString *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return NULL; sql = g_string_new ("INSERT INTO hash_prefix " "(cue, value, threat_type, platform_type, threat_entry_type) VALUES "); @@ -1172,10 +1199,12 @@ gboolean free_statement = TRUE; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (prefixes); + if (!self->is_operable) + return; + if (stmt) { statement = stmt; ephy_sqlite_statement_reset (statement); @@ -1219,10 +1248,12 @@ gsize num_batches; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (prefixes); + if (!self->is_operable) + return; + LOG ("Inserting %lu hash prefixes of size %ld...", num_prefixes, prefix_len); ephy_gsb_storage_start_transaction (self); @@ -1280,10 +1311,12 @@ gsize num_prefixes; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (tes); + if (!self->is_operable) + return; + compression = json_object_get_string_member (tes, "compressionType"); if (!g_strcmp0 (compression, GSB_COMPRESSION_TYPE_RICE)) { rice_hashes = json_object_get_object_member (tes, "riceHashes"); @@ -1335,9 +1368,11 @@ guint id = 0; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (cues); + if (!self->is_operable) + return NULL; + sql = g_string_new ("SELECT value, negative_expires_at <= (CAST(strftime('%s', 'now') AS INT)) " "FROM hash_prefix WHERE cue IN ("); for (GList *l = cues; l && l->data; l = l->next) @@ -1412,9 +1447,11 @@ guint id = 0; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (hashes); + if (!self->is_operable) + return NULL; + sql = g_string_new ("SELECT value, threat_type, platform_type, threat_entry_type, " "expires_at <= (CAST(strftime('%s', 'now') AS INT)) " "FROM hash_full WHERE value IN ("); @@ -1494,10 +1531,12 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (list); g_assert (hash); + if (!self->is_operable) + return; + LOG ("Inserting full hash with duration %ld for list %s/%s/%s", duration, list->threat_type, list->platform_type, list->threat_entry_type); @@ -1576,7 +1615,9 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); + + if (!self->is_operable) + return; LOG ("Deleting full hashes expired for more than %d seconds", EXPIRATION_THRESHOLD); @@ -1625,9 +1666,11 @@ const char *sql; g_assert (EPHY_IS_GSB_STORAGE (self)); - g_assert (self->is_operable); g_assert (prefix); + if (!self->is_operable) + return; + sql = "UPDATE hash_prefix " "SET negative_expires_at=(CAST(strftime('%s', 'now') AS INT)) + ? " "WHERE value=?"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/meson.build new/epiphany-3.32.3/meson.build --- old/epiphany-3.32.2/meson.build 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/meson.build 2019-06-12 00:41:04.000000000 +0200 @@ -1,6 +1,6 @@ project('epiphany', 'c', license: 'GPL3+', - version: '3.32.2', + version: '3.32.3', meson_version: '>= 0.42.0', default_options: ['c_std=gnu11'] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/src/ephy-window.c new/epiphany-3.32.3/src/ephy-window.c --- old/epiphany-3.32.2/src/ephy-window.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/src/ephy-window.c 2019-06-12 00:41:04.000000000 +0200 @@ -1896,17 +1896,6 @@ g_signal_emit_by_name (parent_web_view, "new-window", web_view); } - if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION && - !webkit_web_view_get_uri (web_view)) { - /* Wait until we have a valid URL to decide whether to show the window - * or load the URL in the default web browser - */ - g_object_set_data_full (G_OBJECT (window), "referrer", - g_strdup (webkit_web_view_get_uri (parent_web_view)), - g_free); - return TRUE; - } - gtk_widget_show (GTK_WIDGET (window)); return TRUE; @@ -2040,12 +2029,7 @@ if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION) { if (!gtk_widget_is_visible (GTK_WIDGET (window))) { - char *referrer; - - referrer = (char *)g_object_get_data (G_OBJECT (window), "referrer"); - - if (ephy_embed_utils_urls_have_same_origin (uri, referrer) || - ephy_web_application_is_uri_allowed (uri)) { + if (ephy_web_application_is_uri_allowed (uri)) { gtk_widget_show (GTK_WIDGET (window)); } else { /* We can't get here under flatpak because this code only @@ -2064,10 +2048,8 @@ if (navigation_type == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED || (navigation_type == WEBKIT_NAVIGATION_TYPE_OTHER && webkit_navigation_action_is_user_gesture (navigation_action))) { - if (ephy_embed_utils_urls_have_same_origin (uri, webkit_web_view_get_uri (web_view)) || - ephy_web_application_is_uri_allowed (uri)) { + if (ephy_web_application_is_uri_allowed (uri)) return FALSE; - } /* We can't get here under flatpak because this code only * executes in web app mode. @@ -3376,6 +3358,7 @@ EphyEmbedShellMode mode; EphyWindowChrome chrome = EPHY_WINDOW_CHROME_DEFAULT; GApplication *app; + EphySession *session; G_OBJECT_CLASS (ephy_window_parent_class)->constructed (object); @@ -3536,14 +3519,15 @@ action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "tab"); action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "reopen"); - if (mode == EPHY_EMBED_SHELL_MODE_INCOGNITO || mode == EPHY_EMBED_SHELL_MODE_AUTOMATION) { - g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE); - } else { - g_object_bind_property (G_OBJECT (ephy_shell_get_session (shell)), + session = ephy_shell_get_session (shell); + if (session) { + g_object_bind_property (session, "can-undo-tab-closed", action, "enabled", G_BINDING_SYNC_CREATE); + } else { + g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE); } window->mouse_gesture_controller = ephy_mouse_gesture_controller_new (window); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/src/prefs-dialog.c new/epiphany-3.32.3/src/prefs-dialog.c --- old/epiphany-3.32.2/src/prefs-dialog.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/src/prefs-dialog.c 2019-06-12 00:41:04.000000000 +0200 @@ -1608,7 +1608,6 @@ } g_object_unref (store); - language_editor_update_buttons (dialog); g_strfreev (list); /* Lockdown if key is not writable */ @@ -1627,6 +1626,8 @@ g_settings_bind_writable (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LANGUAGE, dialog->lang_treeview, "sensitive", FALSE); + + language_editor_update_buttons (dialog); } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/epiphany-3.32.2/src/profile-migrator/ephy-profile-migrator.c new/epiphany-3.32.3/src/profile-migrator/ephy-profile-migrator.c --- old/epiphany-3.32.2/src/profile-migrator/ephy-profile-migrator.c 2019-05-02 18:11:14.000000000 +0200 +++ new/epiphany-3.32.3/src/profile-migrator/ephy-profile-migrator.c 2019-06-12 00:41:04.000000000 +0200 @@ -57,8 +57,9 @@ static int migration_version = -1; static char *profile_dir = NULL; -/* The legacy dir is used by everything before version 29 which migrates - * to the new directory */ +/* The legacy dir is used by everything before version 30, which migrates + * to the new directory. + */ static const char * legacy_default_profile_dir (void) { @@ -74,11 +75,14 @@ static char *dir = NULL; if (dir == NULL) { - /* If this isn't actually a legacy dir it starts at a later migrating step anyway */ if (profile_dir != NULL) - dir = profile_dir; + { + dir = profile_dir; + } else - dir = (char *)legacy_default_profile_dir (); + { + dir = (char *)legacy_default_profile_dir (); + } } return dir; } @@ -1067,7 +1071,7 @@ g_autoptr(GError) error = NULL; g_autofree char *old_name = g_strconcat ("app-epiphany-", app->id, NULL); - g_autofree char *old_path = g_build_filename (legacy_profile_dir (), old_name, NULL); + g_autofree char *old_path = g_build_filename (legacy_default_profile_dir (), old_name, NULL); g_autofree char *app_path = ephy_web_application_get_profile_directory (app->id); if (!move_directory_contents (old_path, app_path)) @@ -1082,7 +1086,7 @@ close (fd); // Update Exec and Icon to point to the new profile dir - g_autofree char *old_profile_prefix = g_build_filename (legacy_profile_dir (), "app-epiphany-", NULL); + g_autofree char *old_profile_prefix = g_build_filename (legacy_default_profile_dir (), "app-epiphany-", NULL); g_autofree char *new_profile_prefix = g_build_filename (g_get_user_data_dir (), "epiphany-", NULL); g_autoptr(GKeyFile) file = g_key_file_new (); g_autofree char *desktop_file_path = g_build_filename (app_path, app->desktop_file, NULL); @@ -1261,7 +1265,7 @@ char *history_filename; const char *sql_query; - history_filename = g_build_filename (ephy_profile_dir (), EPHY_HISTORY_FILE, NULL); + history_filename = g_build_filename (legacy_profile_dir (), EPHY_HISTORY_FILE, NULL); if (!g_file_test (history_filename, G_FILE_TEST_EXISTS)) { LOG ("There is no history to migrate..."); goto out; @@ -1412,6 +1416,15 @@ m (); } + if (!g_file_test (ephy_profile_dir (), G_FILE_TEST_EXISTS)) { + LOG ("Original profile directory does not exist. This is an expected" + " failure. Probably a web app is being migrated before the default" + " profile, and its profile directory was moved during the migration." + " Epiphany must be restarted with the new profile directory. The" + " migration will be run again."); + return FALSE; + } + if (ephy_profile_utils_set_migration_version (EPHY_PROFILE_MIGRATION_VERSION) != TRUE) { LOG ("Failed to store the current migration version"); return FALSE;
