Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package profanity for openSUSE:Factory checked in at 2023-09-15 22:05:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/profanity (Old) and /work/SRC/openSUSE:Factory/.profanity.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "profanity" Fri Sep 15 22:05:19 2023 rev:34 rq:1111435 version:0.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/profanity/profanity.changes 2023-08-28 17:15:38.529570657 +0200 +++ /work/SRC/openSUSE:Factory/.profanity.new.1766/profanity.changes 2023-09-15 22:10:37.340177339 +0200 @@ -1,0 +2,6 @@ +Fri Sep 15 05:51:33 UTC 2023 - Michael Vetter <mvet...@suse.com> + +- Add profanity-0.14.0-plugins-install.patch: + Fix crash upon /plugins install while disconnected + +------------------------------------------------------------------- New: ---- profanity-0.14.0-plugins-install.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ profanity.spec ++++++ --- /var/tmp/diff_new_pack.R0XE3J/_old 2023-09-15 22:10:38.592222104 +0200 +++ /var/tmp/diff_new_pack.R0XE3J/_new 2023-09-15 22:10:38.592222104 +0200 @@ -25,10 +25,11 @@ URL: https://profanity-im.github.io Source: https://github.com/profanity-im/profanity/releases/download/%{version}/profanity-%{version}.tar.gz Source1: profanity-rpmlintrc -# all 3 patches taken from upstream repo +# all 4 patches taken from upstream repo Patch0: profanity-0.14.0-ox-carbons.patch Patch1: profanity-0.14.0-typos.patch Patch2: profanity-0.14.0-xscreensaver.patch +Patch3: profanity-0.14.0-plugins-install.patch BuildRequires: glib2-devel >= 2.62 BuildRequires: gtk2-devel BuildRequires: libcurl-devel @@ -88,6 +89,7 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 sed -i -e "s/python-config/python3-config/g" configure %build ++++++ profanity-0.14.0-plugins-install.patch ++++++ >From b88174709f82407624ac058473a71a8b37ed9a10 Mon Sep 17 00:00:00 2001 From: Michael Vetter <jub...@iodoru.org> Date: Mon, 28 Aug 2023 07:55:29 +0200 Subject: [PATCH] Don't crash when using `/plugins install` disconnected When we are not connected and run `/plugins install` we crash because we get the account struct to check for the (xmpp) tls setting. To apply that to the http (etc) connection to download the plugin from a server. This got introduced in 3a86b8c29 to fix #1624. There are several ways to handle this (some described in 1880) in this patch I took the route that it will use secure connection when we are nto connected and will only check the tls.trust account setting if we are connected. Fix https://github.com/profanity-im/profanity/issues/1880 --- src/tools/http_download.c | 5 ++++- src/tools/http_upload.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tools/http_download.c b/src/tools/http_download.c index 6be74bedc..b58e9290b 100644 --- a/src/tools/http_download.c +++ b/src/tools/http_download.c @@ -134,7 +134,10 @@ http_file_get(void* userdata) gchar* cert_path = prefs_get_string(PREF_TLS_CERTPATH); gchar* cafile = cafile_get_name(); ProfAccount* account = accounts_get_account(session_get_account_name()); - gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; + gboolean insecure = FALSE; + if (account) { + insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; + } account_free(account); pthread_mutex_unlock(&lock); diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c index 8be560092..3b3945f3e 100644 --- a/src/tools/http_upload.c +++ b/src/tools/http_upload.c @@ -186,8 +186,11 @@ http_file_put(void* userdata) auto_gchar gchar* cert_path = prefs_get_string(PREF_TLS_CERTPATH); gchar* cafile = cafile_get_name(); + gboolean insecure = FALSE; ProfAccount* account = accounts_get_account(session_get_account_name()); - gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; + if (account) { + insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0; + } account_free(account); pthread_mutex_unlock(&lock);