From 5810f49c97313afbdc1a710c36ff753b19d67b7c Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 22 Apr 2025 17:51:48 +0200 Subject: [PATCH 001/338] url save: fix location printed Print the final storage location when successfully decrypting a file with `aesgcm://` source. Signed-off-by: Steffen Jaeckel --- src/tools/aesgcm_download.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/aesgcm_download.c b/src/tools/aesgcm_download.c index e12b6987..6daece5b 100644 --- a/src/tools/aesgcm_download.c +++ b/src/tools/aesgcm_download.c @@ -140,6 +140,9 @@ aesgcm_file_get(void* userdata) "Downloading '%s' failed: Failed to decrypt " "file (%s).", https_url, gcry_strerror(crypt_res)); + } else { + http_print_transfer_update(aesgcm_dl->window, aesgcm_dl->id, + "Decrypted file saved to '%s'", aesgcm_dl->filename); } if (aesgcm_dl->cmd_template != NULL) { -- 2.49.1 From 4194298dbdba9c921835c01013fabb4c0653c482 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 23 Apr 2025 11:18:45 +0200 Subject: [PATCH 002/338] Less `GString` Signed-off-by: Steffen Jaeckel --- src/ui/window_list.c | 26 ++++++-------------------- src/xmpp/roster_list.c | 7 ++----- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/src/ui/window_list.c b/src/ui/window_list.c index 7ddf4bf5..5735f019 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -258,22 +258,20 @@ GList* wins_get_private_chats(const char* const roomjid) { GList* result = NULL; - GString* prefix = g_string_new(roomjid); - g_string_append(prefix, "/"); + auto_gchar gchar* prefix = g_strdup_printf("%s/", roomjid); GList* curr = values; while (curr) { ProfWin* window = curr->data; if (window->type == WIN_PRIVATE) { ProfPrivateWin* privatewin = (ProfPrivateWin*)window; - if (roomjid == NULL || g_str_has_prefix(privatewin->fulljid, prefix->str)) { + if (roomjid == NULL || g_str_has_prefix(privatewin->fulljid, prefix)) { result = g_list_append(result, privatewin); } } curr = g_list_next(curr); } - g_string_free(prefix, TRUE); return result; } @@ -1067,19 +1065,13 @@ wins_create_summary(gboolean unread) while (curr) { ProfWin* window = g_hash_table_lookup(windows, curr->data); if (!unread || (unread && win_unread(window) > 0)) { - GString* line = g_string_new(""); - int ui_index = GPOINTER_TO_INT(curr->data); auto_gchar gchar* winstring = win_to_string(window); if (!winstring) { - g_string_free(line, TRUE); continue; } - - g_string_append_printf(line, "%d: %s", ui_index, winstring); - - result = g_slist_append(result, strdup(line->str)); - g_string_free(line, TRUE); + gchar* line = g_strdup_printf("%d: %s", ui_index, winstring); + result = g_slist_append(result, line); } curr = g_list_next(curr); @@ -1108,19 +1100,13 @@ wins_create_summary_attention() has_attention = mucwin->has_attention; } if (has_attention) { - GString* line = g_string_new(""); - int ui_index = GPOINTER_TO_INT(curr->data); auto_gchar gchar* winstring = win_to_string(window); if (!winstring) { - g_string_free(line, TRUE); continue; } - - g_string_append_printf(line, "%d: %s", ui_index, winstring); - - result = g_slist_append(result, strdup(line->str)); - g_string_free(line, TRUE); + gchar* line = g_strdup_printf("%d: %s", ui_index, winstring); + result = g_slist_append(result, line); } curr = g_list_next(curr); } diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c index 40b8210d..5a710997 100644 --- a/src/xmpp/roster_list.c +++ b/src/xmpp/roster_list.c @@ -275,11 +275,8 @@ roster_remove(const char* const name, const char* const barejid) if (contact) { GList* resources = p_contact_get_available_resources(contact); while (resources) { - GString* fulljid = g_string_new(barejid); - g_string_append(fulljid, "/"); - g_string_append(fulljid, resources->data); - autocomplete_remove(roster->fulljid_ac, fulljid->str); - g_string_free(fulljid, TRUE); + auto_gchar gchar* fulljid = g_strdup_printf("%s/%s", barejid, resources->data); + autocomplete_remove(roster->fulljid_ac, fulljid); resources = g_list_next(resources); } g_list_free(resources); -- 2.49.1 From 29129bf88805ecf467d828271901ce8af800358c Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 25 Apr 2025 14:34:45 +0200 Subject: [PATCH 003/338] Return error on `/time ` Fixes: 9c2b3f6579 ("Re-factor `cmd_time()`") Signed-off-by: Steffen Jaeckel --- src/command/cmd_funcs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 7bc19040..10cef531 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -5314,7 +5314,8 @@ cmd_time(ProfWin* window, const char* const command, gchar** args) }; gboolean redraw = FALSE; gboolean set_all = g_strcmp0(args[0], "all") == 0; - for (size_t n = 0; n < ARRAY_SIZE(time_prefs); ++n) { + size_t n = 0; + for (; n < ARRAY_SIZE(time_prefs); ++n) { if (!set_all && g_strcmp0(args[0], time_prefs[n].name) != 0) continue; const struct time_preferences* tp = &time_prefs[n]; @@ -5355,6 +5356,9 @@ cmd_time(ProfWin* window, const char* const command, gchar** args) return TRUE; } } + if (!set_all && n == ARRAY_SIZE(time_prefs)) { + cons_bad_cmd_usage(command); + } if (redraw) ui_redraw(); return TRUE; -- 2.49.1 From 4eaa291f700db436a76387378c509321a0fe794b Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 25 Apr 2025 14:35:36 +0200 Subject: [PATCH 004/338] Re-factor `cmd_presence()` Similar to 9c2b3f6579, but no bugs were fixed. Maybe some were introduced but only time will tell. Signed-off-by: Steffen Jaeckel --- src/command/cmd_funcs.c | 71 +++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 10cef531..098d192f 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -5233,54 +5233,43 @@ cmd_console(ProfWin* window, const char* const command, gchar** args) gboolean cmd_presence(ProfWin* window, const char* const command, gchar** args) { - if (strcmp(args[0], "console") != 0 && strcmp(args[0], "chat") != 0 && strcmp(args[0], "room") != 0 && strcmp(args[0], "titlebar") != 0) { - cons_bad_cmd_usage(command); - return TRUE; - } - if (strcmp(args[0], "titlebar") == 0) { _cmd_set_boolean_preference(args[1], "Contact presence", PREF_PRESENCE); return TRUE; } - if (strcmp(args[1], "all") != 0 && strcmp(args[1], "online") != 0 && strcmp(args[1], "none") != 0) { + const struct presence_preferences + { + preference_t pref; + const char *name, *description; + } presence_prefs[] = { + { .pref = PREF_STATUSES_CONSOLE, .name = "console", .description = "the console" }, + { .pref = PREF_STATUSES_CHAT, .name = "chat", .description = "chat windows" }, + { .pref = PREF_STATUSES_MUC, .name = "room", .description = "chat room windows" }, + }; + size_t n = 0; + for (; n < ARRAY_SIZE(presence_prefs); ++n) { + const struct presence_preferences* pp = &presence_prefs[n]; + if (g_strcmp0(args[0], pp->name) != 0) + continue; + if (strcmp(args[1], "all") == 0) { + cons_show("All presence updates will appear in %s.", pp->description); + } else if (strcmp(args[1], "online") == 0) { + cons_show("Only %s presence updates will appear in %s.", + pp->pref == PREF_STATUSES_MUC ? "join/leave" : "online/offline", + pp->description); + } else if (strcmp(args[1], "none") == 0) { + cons_show("Presence updates will not appear in %s.", pp->description); + } else { + cons_bad_cmd_usage(command); + return TRUE; + } + prefs_set_string(pp->pref, args[1]); + break; + } + if (n == ARRAY_SIZE(presence_prefs)) { cons_bad_cmd_usage(command); - return TRUE; } - - if (strcmp(args[0], "console") == 0) { - prefs_set_string(PREF_STATUSES_CONSOLE, args[1]); - if (strcmp(args[1], "all") == 0) { - cons_show("All presence updates will appear in the console."); - } else if (strcmp(args[1], "online") == 0) { - cons_show("Only online/offline presence updates will appear in the console."); - } else { - cons_show("Presence updates will not appear in the console."); - } - } - - if (strcmp(args[0], "chat") == 0) { - prefs_set_string(PREF_STATUSES_CHAT, args[1]); - if (strcmp(args[1], "all") == 0) { - cons_show("All presence updates will appear in chat windows."); - } else if (strcmp(args[1], "online") == 0) { - cons_show("Only online/offline presence updates will appear in chat windows."); - } else { - cons_show("Presence updates will not appear in chat windows."); - } - } - - if (strcmp(args[0], "room") == 0) { - prefs_set_string(PREF_STATUSES_MUC, args[1]); - if (strcmp(args[1], "all") == 0) { - cons_show("All presence updates will appear in chat room windows."); - } else if (strcmp(args[1], "online") == 0) { - cons_show("Only join/leave presence updates will appear in chat room windows."); - } else { - cons_show("Presence updates will not appear in chat room windows."); - } - } - return TRUE; } -- 2.49.1 From f7cddd11c4c8bee1d640c68315134000f32490c7 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 28 Apr 2025 16:42:27 +0200 Subject: [PATCH 005/338] Improve const correctness Signed-off-by: Steffen Jaeckel --- src/xmpp/jid.c | 2 +- src/xmpp/jid.h | 2 +- src/xmpp/presence.c | 4 ++-- src/xmpp/roster_list.c | 2 +- tests/unittests/test_jid.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/xmpp/jid.c b/src/xmpp/jid.c index 1f3b1a66..6b5bb62c 100644 --- a/src/xmpp/jid.c +++ b/src/xmpp/jid.c @@ -190,7 +190,7 @@ get_nick_from_full_jid(const char* const full_room_jid) /* * get the fulljid, fall back to the barejid */ -char* +const char* jid_fulljid_or_barejid(Jid* jid) { if (jid->fulljid) { diff --git a/src/xmpp/jid.h b/src/xmpp/jid.h index 8c1b683d..a591b743 100644 --- a/src/xmpp/jid.h +++ b/src/xmpp/jid.h @@ -63,7 +63,7 @@ gboolean jid_is_valid_room_form(Jid* jid); char* create_fulljid(const char* const barejid, const char* const resource); char* get_nick_from_full_jid(const char* const full_room_jid); -char* jid_fulljid_or_barejid(Jid* jid); +const char* jid_fulljid_or_barejid(Jid* jid); gchar* jid_random_resource(void); #endif diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 577a2e82..3ad2880f 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -621,7 +621,7 @@ _available_handler(xmpp_stanza_t* const stanza) } return; } else { - char* jid = jid_fulljid_or_barejid(xmpp_presence->jid); + const char* jid = jid_fulljid_or_barejid(xmpp_presence->jid); log_debug("Presence available handler fired for: %s", jid); } @@ -632,7 +632,7 @@ _available_handler(xmpp_stanza_t* const stanza) XMPPCaps* caps = stanza_parse_caps(stanza); if ((g_strcmp0(my_jid->fulljid, xmpp_presence->jid->fulljid) != 0) && caps) { log_debug("Presence contains capabilities."); - char* jid = jid_fulljid_or_barejid(xmpp_presence->jid); + const char* jid = jid_fulljid_or_barejid(xmpp_presence->jid); _handle_caps(jid, caps); } stanza_free_caps(caps); diff --git a/src/xmpp/roster_list.c b/src/xmpp/roster_list.c index 5a710997..771c7af1 100644 --- a/src/xmpp/roster_list.c +++ b/src/xmpp/roster_list.c @@ -275,7 +275,7 @@ roster_remove(const char* const name, const char* const barejid) if (contact) { GList* resources = p_contact_get_available_resources(contact); while (resources) { - auto_gchar gchar* fulljid = g_strdup_printf("%s/%s", barejid, resources->data); + auto_gchar gchar* fulljid = g_strdup_printf("%s/%s", barejid, (char*)resources->data); autocomplete_remove(roster->fulljid_ac, fulljid); resources = g_list_next(resources); } diff --git a/tests/unittests/test_jid.c b/tests/unittests/test_jid.c index 2650d5da..645a7b0a 100644 --- a/tests/unittests/test_jid.c +++ b/tests/unittests/test_jid.c @@ -219,7 +219,7 @@ returns_fulljid_when_exists(void** state) { Jid* jid = jid_create("localpart@domainpart/resourcepart"); - char* result = jid_fulljid_or_barejid(jid); + const char* result = jid_fulljid_or_barejid(jid); assert_string_equal("localpart@domainpart/resourcepart", result); @@ -231,7 +231,7 @@ returns_barejid_when_fulljid_not_exists(void** state) { Jid* jid = jid_create("localpart@domainpart"); - char* result = jid_fulljid_or_barejid(jid); + const char* result = jid_fulljid_or_barejid(jid); assert_string_equal("localpart@domainpart", result); -- 2.49.1 From dd8da16c96e4cb8d3afd38216cee69b8056375fe Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 23 Jun 2025 12:43:04 +0200 Subject: [PATCH 006/338] Use correct `free` function. Fixes: 75d76638 ("Free wins summary list") Signed-off-by: Steffen Jaeckel --- src/ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/console.c b/src/ui/console.c index 2cb88c60..82cf5ac6 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -484,7 +484,7 @@ cons_show_wins(gboolean unread) } curr = g_slist_next(curr); } - g_slist_free_full(window_strings, free); + g_slist_free_full(window_strings, g_free); cons_alert(NULL); } @@ -505,7 +505,7 @@ cons_show_wins_attention() } curr = g_slist_next(curr); } - g_slist_free_full(window_strings, free); + g_slist_free_full(window_strings, g_free); cons_alert(NULL); } -- 2.49.1 From 7164d71992f66240cf4d5c84fea1bd8835118b20 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 24 Jun 2025 09:05:39 +0200 Subject: [PATCH 007/338] ci: disable arch temporarily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Will need to fix this soon. Lets temp remove arch to get results for the other systems. Build fail on Arch: ``` src/pgp/gpg.c: In function ‘p_gpg_decrypt’: src/pgp/gpg.c:659:36: error: implicit declaration of function ‘gpgme_key_get_string_attr’ [-Wimplicit-function-declaration] 659 | const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~ src/pgp/gpg.c:659:67: error: ‘GPGME_ATTR_EMAIL’ undeclared (first use in this function) 659 | const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); | ^~~~~~~~~~~~~~~~ src/pgp/gpg.c:659:67: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [Makefile:2085: src/pgp/gpg.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1314: all] Error 2 ``` --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 95560e36..3d33584c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - flavor: [arch, debian, fedora, ubuntu] + flavor: [debian, fedora, ubuntu] name: Linux steps: -- 2.49.1 From 606eaac31dfb97df16b0d2ba9466a3a67bec122a Mon Sep 17 00:00:00 2001 From: Quaylyn Rimer Date: Tue, 22 Jul 2025 20:27:43 -0600 Subject: [PATCH 008/338] Fix GPGME >= 2.0.0 compatibility issue #2048 Replace deprecated gpgme_key_get_string_attr with modern API This commit fixes the build failure against GPGME >= 2.0.0 where gpgme_key_get_string_attr and GPGME_ATTR_EMAIL were removed. Changes made: - Replaced direct call to gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0) - Added new helper function _gpgme_key_get_email() with backwards compatibility - Function uses conditional compilation to support both old and new GPGME versions Backwards Compatibility: - GPGME < 2.0.0: Uses gpgme_key_get_string_attr() if GPGME_ATTR_EMAIL is available - GPGME >= 2.0.0: Uses modern key->uids->email API Forward Compatibility: - Code compiles successfully with GPGME 2.0.0+ where deprecated functions are removed - Uses modern GPGME API that iterates through key user IDs to find email addresses Testing: - Tested with GPGME 1.18.0 (backwards compatibility confirmed) - Tested compilation compatibility for both old and new GPGME versions - Verified the exact error from issue #2048 is resolved - Confirmed no regression in functionality Fixes: #2048 Resolves compilation error: 'gpgme_key_get_string_attr' undeclared Resolves compilation error: 'GPGME_ATTR_EMAIL' undeclared --- src/pgp/gpg.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index cae16ffb..81e03e4c 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -76,6 +76,7 @@ static char* _add_header_footer(const char* const str, const char* const header, static char* _gpgme_data_to_char(gpgme_data_t data); static void _save_pubkeys(void); static ProfPGPKey* _gpgme_key_to_ProfPGPKey(gpgme_key_t key); +static const char* _gpgme_key_get_email(gpgme_key_t key); void _p_gpg_free_pubkeyid(ProfPGPPubKeyId* pubkeyid) @@ -656,7 +657,7 @@ p_gpg_decrypt(const char* const cipher) error = gpgme_get_key(ctx, recipient->keyid, &key, 1); if (!error && key) { - const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); + const char* addr = _gpgme_key_get_email(key); if (addr) { g_string_append(recipients_str, addr); } @@ -888,6 +889,40 @@ _gpgme_key_to_ProfPGPKey(gpgme_key_t key) return p_pgpkey; } +/** + * Extract the first email address from a gpgme_key_t object. + * This function provides backwards compatibility for both old and new GPGME versions. + * - GPGME < 2.0.0: Uses gpgme_key_get_string_attr (if available) + * - GPGME >= 2.0.0: Uses modern key->uids->email API + * + * @param key The gpgme_key_t object to extract email from. + * @return The first email address found in the key's user IDs, or NULL if none found. + * The returned string should not be freed as it points to internal gpgme memory. + */ +static const char* +_gpgme_key_get_email(gpgme_key_t key) +{ + if (!key) { + return NULL; + } + +#ifdef GPGME_ATTR_EMAIL + /* Use deprecated function if available (GPGME < 2.0.0) */ + return gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0); +#else + /* Use modern API for GPGME >= 2.0.0 */ + gpgme_user_id_t uid = key->uids; + while (uid) { + if (uid->email && strlen(uid->email) > 0) { + return uid->email; + } + uid = uid->next; + } + + return NULL; +#endif +} + /** * Convert a gpgme_data_t object to a null-terminated char* string. * -- 2.49.1 From edda887ae65ef7543c1552e106d87153270f6fde Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 23 Jul 2025 09:08:57 +0200 Subject: [PATCH 009/338] ci: enable arch This reverts commit 7164d71992f66240cf4d5c84fea1bd8835118b20. See fix 606eaac31dfb97df16b0d2ba9466a3a67bec122a. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3d33584c..95560e36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - flavor: [debian, fedora, ubuntu] + flavor: [arch, debian, fedora, ubuntu] name: Linux steps: -- 2.49.1 From 9f2abc75ad27d3dcc951b8fc5aa922bdbe76f287 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Mon, 28 Jul 2025 18:38:26 +0200 Subject: [PATCH 010/338] Fix tests with gcc15 (uintptr_t) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: error: ‘uintptr_t’ undeclared, defined in header ‘ --- tests/unittests/config/stub_accounts.c | 1 + tests/unittests/log/stub_log.c | 1 + tests/unittests/test_autocomplete.c | 1 + tests/unittests/test_chat_session.c | 1 + tests/unittests/test_common.c | 1 + tests/unittests/test_jid.c | 1 + tests/unittests/test_parser.c | 1 + tests/unittests/test_preferences.c | 1 + tests/unittests/test_roster_list.c | 1 + 9 files changed, 9 insertions(+) diff --git a/tests/unittests/config/stub_accounts.c b/tests/unittests/config/stub_accounts.c index 360e5643..981d0180 100644 --- a/tests/unittests/config/stub_accounts.c +++ b/tests/unittests/config/stub_accounts.c @@ -1,5 +1,6 @@ #include #include +#include #include #include diff --git a/tests/unittests/log/stub_log.c b/tests/unittests/log/stub_log.c index 23ab5cdc..f0f67e47 100644 --- a/tests/unittests/log/stub_log.c +++ b/tests/unittests/log/stub_log.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/tests/unittests/test_autocomplete.c b/tests/unittests/test_autocomplete.c index 599cf390..0e307351 100644 --- a/tests/unittests/test_autocomplete.c +++ b/tests/unittests/test_autocomplete.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/tests/unittests/test_chat_session.c b/tests/unittests/test_chat_session.c index 26845dbc..2de18c08 100644 --- a/tests/unittests/test_chat_session.c +++ b/tests/unittests/test_chat_session.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "xmpp/chat_session.h" diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c index f381947b..e340fcf3 100644 --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -5,6 +5,7 @@ #include #include #include +#include void replace_one_substr(void** state) diff --git a/tests/unittests/test_jid.c b/tests/unittests/test_jid.c index 645a7b0a..77886e4a 100644 --- a/tests/unittests/test_jid.c +++ b/tests/unittests/test_jid.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/tests/unittests/test_parser.c b/tests/unittests/test_parser.c index 3d0d3fc6..8019097d 100644 --- a/tests/unittests/test_parser.c +++ b/tests/unittests/test_parser.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/tests/unittests/test_preferences.c b/tests/unittests/test_preferences.c index 7868791d..1eb2ba36 100644 --- a/tests/unittests/test_preferences.c +++ b/tests/unittests/test_preferences.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/tests/unittests/test_roster_list.c b/tests/unittests/test_roster_list.c index fc10d1a7..185a9c72 100644 --- a/tests/unittests/test_roster_list.c +++ b/tests/unittests/test_roster_list.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "xmpp/contact.h" #include "xmpp/roster_list.h" -- 2.49.1 From 5696bf77c73300ddc0075aac78ca29a504ea14ad Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 3 Aug 2025 23:17:42 +0200 Subject: [PATCH 011/338] Fix typo in examples. --- src/command/cmd_defs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index e5fb3cf0..e33dcdb1 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -433,7 +433,7 @@ static const struct cmd_t command_defs[] = { { "", "The contact you wish to view information about." }, { "", "When in a chat room, the occupant you wish to view information about." }) CMD_EXAMPLES( - "/info thor@aasgard.server.org", + "/info thor@asgard.server.org", "/info heimdall") }, -- 2.49.1 From 3370f8a7f1641e571d9219a69d723d1bf5b20d3f Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 28 Jul 2025 11:24:35 +0200 Subject: [PATCH 012/338] Separate entries visually in my-prof.supp Signed-off-by: Steffen Jaeckel --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index e9a1c365..717ab9a0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -346,9 +346,13 @@ endif .PHONY: my-prof.supp my-prof.supp: @sed '/^# AUTO-GENERATED START/q' prof.supp > $@ + @printf "\n\n# glib\n" >> $@ @cat /usr/share/glib-2.0/valgrind/glib.supp >> $@ + @printf "\n\n# Python\n" >> $@ @wget -O- https://raw.githubusercontent.com/python/cpython/refs/tags/v`python3 --version | cut -d' ' -f2`/Misc/valgrind-python.supp >> $@ + @printf "\n\n# gtk\n" >> $@ @test -z "@GTK_VERSION@" || wget -O- https://raw.githubusercontent.com/GNOME/gtk/refs/tags/@GTK_VERSION@/gtk.supp >> $@ + @printf "\n\n# more gtk\n" >> $@ @test -z "@GTK_VERSION@" || cat /usr/share/gtk-3.0/valgrind/gtk.supp >> $@ check-unit: tests/unittests/unittests -- 2.49.1 From 3299dd8fc62dd317a9bdf83408d6d5e28b9ecfa0 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 28 Jul 2025 11:27:31 +0200 Subject: [PATCH 013/338] Trampoline Python unref again. In the past `Py_XDECREF()` was a macro. Preserve compat to ancient Python versions by having a trampoline which calls `Py_XDECREF()`. Fixes: #2043 Fixes: c0da36c4 ("Rage-cleanup.") Signed-off-by: Steffen Jaeckel --- src/plugins/python_plugins.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c index 8cd721df..29dee4b7 100644 --- a/src/plugins/python_plugins.c +++ b/src/plugins/python_plugins.c @@ -86,10 +86,16 @@ python_get_version_number(void) return version_number; } +static void +_unref_module(PyObject* module) +{ + Py_XDECREF(module); +} + void python_env_init(void) { - loaded_modules = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)Py_XDECREF); + loaded_modules = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)_unref_module); python_init_prof(); -- 2.49.1 From e0f107f75eadd2a807044b4deee0c29efc3cce29 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 28 Jul 2025 11:27:54 +0200 Subject: [PATCH 014/338] Fix memory leak. Signed-off-by: Steffen Jaeckel --- src/command/cmd_funcs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 098d192f..7ebfa7d8 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8565,19 +8565,20 @@ cmd_omemo_trust_mode(ProfWin* window, const char* const command, gchar** args) { #ifdef HAVE_OMEMO + auto_gchar gchar* trust_mode = prefs_get_string(PREF_OMEMO_TRUST_MODE); if (!args[1]) { - cons_show("Current trust mode is %s", prefs_get_string(PREF_OMEMO_TRUST_MODE)); + cons_show("Current trust mode is %s", trust_mode); return TRUE; } if (g_strcmp0(args[1], "manual") == 0) { - cons_show("Current trust mode is %s - setting to %s", prefs_get_string(PREF_OMEMO_TRUST_MODE), args[1]); + cons_show("Current trust mode is %s - setting to %s", trust_mode, args[1]); cons_show("You need to trust all OMEMO fingerprints manually"); } else if (g_strcmp0(args[1], "firstusage") == 0) { - cons_show("Current trust mode is %s - setting to %s", prefs_get_string(PREF_OMEMO_TRUST_MODE), args[1]); + cons_show("Current trust mode is %s - setting to %s", trust_mode, args[1]); cons_show("The first seen OMEMO fingerprints will be trusted automatically - new keys must be trusted manually"); } else if (g_strcmp0(args[1], "blind") == 0) { - cons_show("Current trust mode is %s - setting to %s", prefs_get_string(PREF_OMEMO_TRUST_MODE), args[1]); + cons_show("Current trust mode is %s - setting to %s", trust_mode, args[1]); cons_show("ALL OMEMO fingerprints will be trusted automatically"); } else { cons_bad_cmd_usage(command); -- 2.49.1 From 40aafd06e770fa7c4eaf0d5261217fc15fad3046 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 28 Jul 2025 15:17:40 +0200 Subject: [PATCH 015/338] Refactor slashguard Fixes #2054 Fixes: 95c2199c ("Some more memory improvements") Signed-off-by: Steffen Jaeckel --- src/ui/inputwin.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index e1cb10cf..0bc7c6f8 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -170,6 +170,25 @@ create_input_window(void) _inp_win_update_virtual(); } +static gboolean +_inp_slashguard_check(void) +{ + if (get_password) + return false; + /* ignore empty and quoted messages */ + if (inp_line == NULL || inp_line[0] == '\0' || inp_line[0] == '>') + return false; + if (!prefs_get_boolean(PREF_SLASH_GUARD)) + return false; + if (memchr(inp_line + 1, '/', 3)) { + cons_show("Your text contains a slash in the first 4 characters"); + free(inp_line); + inp_line = NULL; + return true; + } + return false; +} + char* inp_readline(void) { @@ -203,17 +222,7 @@ inp_readline(void) chat_state_idle(); } - if (inp_line) { - if (!get_password && prefs_get_boolean(PREF_SLASH_GUARD)) { - // ignore quoted messages - if (strlen(inp_line) > 1 && inp_line[0] != '>') { - char* res = (char*)memchr(inp_line + 1, '/', 3); - if (res) { - cons_show("Your text contains a slash in the first 4 characters"); - return NULL; - } - } - } + if (inp_line && !_inp_slashguard_check()) { char* ret = inp_line; inp_line = NULL; return ret; -- 2.49.1 From 9d335729a0c47fa2da9505a86b0366b381d689e1 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 5 Aug 2025 16:23:34 +0200 Subject: [PATCH 016/338] Tidy up some code * less allocations * less duplicate code Signed-off-by: Steffen Jaeckel --- src/command/cmd_ac.c | 64 +++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 40 deletions(-) diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 62faf705..036782b9 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -1662,7 +1662,7 @@ char* cmd_ac_complete_filepath(const char* const input, char* const startstr, gboolean previous) { unsigned int output_off = 0; - char* tmp; + char* tmp = NULL; // strip command char* inpcp = (char*)input + strlen(startstr); @@ -1674,38 +1674,36 @@ cmd_ac_complete_filepath(const char* const input, char* const startstr, gboolean // strip quotes if (*inpcp == '"') { - tmp = strchr(inpcp + 1, '"'); + tmp = strrchr(inpcp + 1, '"'); if (tmp) { *tmp = '\0'; } tmp = strdup(inpcp + 1); free(inpcp); inpcp = tmp; + tmp = NULL; } // expand ~ to $HOME if (inpcp[0] == '~' && inpcp[1] == '/') { - tmp = g_strdup_printf("%s/%sfoo", getenv("HOME"), inpcp + 2); - if (!tmp) { + char* home = getenv("HOME"); + if (!home) { free(inpcp); return NULL; } - output_off = strlen(getenv("HOME")) + 1; + tmp = g_strdup_printf("%s/%sfoo", home, inpcp + 2); + output_off = strlen(home) + 1; } else { tmp = g_strdup_printf("%sfoo", inpcp); - if (!tmp) { - free(inpcp); - return NULL; - } } free(inpcp); - inpcp = tmp; + if (!tmp) { + return NULL; + } - char* inpcp2 = strdup(inpcp); - char* foofile = strdup(basename(inpcp2)); - char* directory = strdup(dirname(inpcp)); - free(inpcp); - free(inpcp2); + char* foofile = strdup(basename(tmp)); + char* directory = strdup(dirname(tmp)); + g_free(tmp); GArray* files = g_array_new(TRUE, FALSE, sizeof(char*)); g_array_set_clear_func(files, (GDestroyNotify)_filepath_item_free); @@ -1724,40 +1722,26 @@ cmd_ac_complete_filepath(const char* const input, char* const startstr, gboolean continue; } - char* acstring; + char* acstring = NULL; if (output_off) { tmp = g_strdup_printf("%s/%s", directory, dir->d_name); - if (!tmp) { - free(directory); - free(foofile); - return NULL; + if (tmp) { + acstring = g_strdup_printf("~/%s", tmp + output_off); + g_free(tmp); } - acstring = g_strdup_printf("~/%s", tmp + output_off); - if (!acstring) { - free(directory); - free(foofile); - return NULL; - } - free(tmp); } else if (strcmp(directory, "/") == 0) { acstring = g_strdup_printf("/%s", dir->d_name); - if (!acstring) { - free(directory); - free(foofile); - return NULL; - } } else { acstring = g_strdup_printf("%s/%s", directory, dir->d_name); - if (!acstring) { - free(directory); - free(foofile); - return NULL; - } + } + if (!acstring) { + g_array_free(files, TRUE); + free(foofile); + free(directory); + return NULL; } - char* acstring_cpy = strdup(acstring); - g_array_append_val(files, acstring_cpy); - free(acstring); + g_array_append_val(files, acstring); } closedir(d); } -- 2.49.1 From 65f5883feeb3082b547ef4111c9f433d48bf0ec1 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 6 Aug 2025 15:47:19 +0200 Subject: [PATCH 017/338] Introduce `tests/prof_cmocka.h` As 9f2abc75 accidentally got the ordering of some of the includes wrong, I decided to propose my initial solution again. Additional to that, I've opened a MR against CMocka to solve this on their side, since I believe that the current way this is done is not sustainable [0]. [0] https://gitlab.com/cmocka/cmocka/-/merge_requests/91 Fixes: 9f2abc75 ("Fix tests with gcc15 (uintptr_t)") Signed-off-by: Steffen Jaeckel --- Makefile.am | 3 +++ tests/functionaltests/functionaltests.c | 5 +---- tests/functionaltests/proftest.c | 5 +---- tests/functionaltests/test_carbons.c | 5 +---- tests/functionaltests/test_chat_session.c | 5 +---- tests/functionaltests/test_connect.c | 5 +---- tests/functionaltests/test_disconnect.c | 5 +---- tests/functionaltests/test_message.c | 5 +---- tests/functionaltests/test_muc.c | 5 +---- tests/functionaltests/test_ping.c | 5 +---- tests/functionaltests/test_presence.c | 5 +---- tests/functionaltests/test_receipts.c | 5 +---- tests/functionaltests/test_rooms.c | 5 +---- tests/functionaltests/test_roster.c | 5 +---- tests/functionaltests/test_software.c | 5 +---- tests/prof_cmocka.h | 5 +++++ tests/unittests/chatlog/stub_chatlog.c | 3 +-- tests/unittests/config/stub_accounts.c | 6 +----- tests/unittests/database/stub_database.c | 3 +-- tests/unittests/helpers.c | 5 +---- tests/unittests/log/stub_log.c | 4 +--- tests/unittests/otr/stub_otr.c | 5 +---- tests/unittests/test_autocomplete.c | 6 +----- tests/unittests/test_callbacks.c | 5 +---- tests/unittests/test_chat_session.c | 6 +----- tests/unittests/test_cmd_account.c | 5 +---- tests/unittests/test_cmd_alias.c | 5 +---- tests/unittests/test_cmd_bookmark.c | 5 +---- tests/unittests/test_cmd_connect.c | 5 +---- tests/unittests/test_cmd_disconnect.c | 5 +---- tests/unittests/test_cmd_join.c | 5 +---- tests/unittests/test_cmd_otr.c | 5 +---- tests/unittests/test_cmd_pgp.c | 5 +---- tests/unittests/test_cmd_presence.c | 5 +---- tests/unittests/test_cmd_rooms.c | 5 +---- tests/unittests/test_cmd_roster.c | 5 +---- tests/unittests/test_cmd_sub.c | 5 +---- tests/unittests/test_common.c | 6 +----- tests/unittests/test_contact.c | 5 +---- tests/unittests/test_form.c | 5 +---- tests/unittests/test_jid.c | 6 +----- tests/unittests/test_keyhandlers.c | 5 +---- tests/unittests/test_muc.c | 5 +---- tests/unittests/test_parser.c | 6 +----- tests/unittests/test_plugins_disco.c | 5 +---- tests/unittests/test_preferences.c | 6 +----- tests/unittests/test_roster_list.c | 6 +----- tests/unittests/test_server_events.c | 5 +---- tests/unittests/ui/stub_ui.c | 3 +-- tests/unittests/unittests.c | 5 +---- tests/unittests/xmpp/stub_xmpp.c | 5 +---- 51 files changed, 57 insertions(+), 197 deletions(-) create mode 100644 tests/prof_cmocka.h diff --git a/Makefile.am b/Makefile.am index 717ab9a0..afcc735e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,6 +124,7 @@ unittest_sources = \ src/event/server_events.c src/event/server_events.h \ src/event/client_events.c src/event/client_events.h \ src/ui/tray.h src/ui/tray.c \ + tests/prof_cmocka.h \ tests/unittests/xmpp/stub_vcard.c \ tests/unittests/xmpp/stub_avatar.c \ tests/unittests/xmpp/stub_ox.c \ @@ -169,6 +170,7 @@ unittest_sources = \ tests/unittests/unittests.c functionaltest_sources = \ + tests/prof_cmocka.h \ tests/functionaltests/proftest.c tests/functionaltests/proftest.h \ tests/functionaltests/test_connect.c tests/functionaltests/test_connect.h \ tests/functionaltests/test_ping.c tests/functionaltests/test_ping.h \ @@ -283,6 +285,7 @@ endif TESTS = tests/unittests/unittests check_PROGRAMS = tests/unittests/unittests +tests_unittests_unittests_CPPFLAGS = -Itests/ tests_unittests_unittests_SOURCES = $(unittest_sources) tests_unittests_unittests_LDADD = -lcmocka diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index 3106a0e2..ea957e49 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -1,10 +1,7 @@ -#include #include #include #include -#include -#include -#include +#include "prof_cmocka.h" #include #include "config.h" diff --git a/tests/functionaltests/proftest.c b/tests/functionaltests/proftest.c index 2fe904e4..29c1d4f4 100644 --- a/tests/functionaltests/proftest.c +++ b/tests/functionaltests/proftest.c @@ -2,11 +2,8 @@ #include #include -#include -#include -#include #include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/functionaltests/test_carbons.c b/tests/functionaltests/test_carbons.c index 7926a76f..ddf6194d 100644 --- a/tests/functionaltests/test_carbons.c +++ b/tests/functionaltests/test_carbons.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_chat_session.c b/tests/functionaltests/test_chat_session.c index 6589ae36..355b977f 100644 --- a/tests/functionaltests/test_chat_session.c +++ b/tests/functionaltests/test_chat_session.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_connect.c b/tests/functionaltests/test_connect.c index e7dae21e..571293dc 100644 --- a/tests/functionaltests/test_connect.c +++ b/tests/functionaltests/test_connect.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_disconnect.c b/tests/functionaltests/test_disconnect.c index 83861980..2827805f 100644 --- a/tests/functionaltests/test_disconnect.c +++ b/tests/functionaltests/test_disconnect.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_message.c b/tests/functionaltests/test_message.c index e622d7ff..9260813e 100644 --- a/tests/functionaltests/test_message.c +++ b/tests/functionaltests/test_message.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_muc.c b/tests/functionaltests/test_muc.c index 7727cb28..43910936 100644 --- a/tests/functionaltests/test_muc.c +++ b/tests/functionaltests/test_muc.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_ping.c b/tests/functionaltests/test_ping.c index 834e4447..a5aeba3b 100644 --- a/tests/functionaltests/test_ping.c +++ b/tests/functionaltests/test_ping.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_presence.c b/tests/functionaltests/test_presence.c index 91bd2644..0bd1915d 100644 --- a/tests/functionaltests/test_presence.c +++ b/tests/functionaltests/test_presence.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_receipts.c b/tests/functionaltests/test_receipts.c index 59054ee8..3debd977 100644 --- a/tests/functionaltests/test_receipts.c +++ b/tests/functionaltests/test_receipts.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_rooms.c b/tests/functionaltests/test_rooms.c index 49b1d892..dbe861e1 100644 --- a/tests/functionaltests/test_rooms.c +++ b/tests/functionaltests/test_rooms.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_roster.c b/tests/functionaltests/test_roster.c index c16764be..e6453fe1 100644 --- a/tests/functionaltests/test_roster.c +++ b/tests/functionaltests/test_roster.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/functionaltests/test_software.c b/tests/functionaltests/test_software.c index 00bccf61..c382d290 100644 --- a/tests/functionaltests/test_software.c +++ b/tests/functionaltests/test_software.c @@ -1,8 +1,5 @@ #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/prof_cmocka.h b/tests/prof_cmocka.h new file mode 100644 index 00000000..c8561404 --- /dev/null +++ b/tests/prof_cmocka.h @@ -0,0 +1,5 @@ +#include +#include +#include +#include +#include diff --git a/tests/unittests/chatlog/stub_chatlog.c b/tests/unittests/chatlog/stub_chatlog.c index 2d8eb382..9a53f432 100644 --- a/tests/unittests/chatlog/stub_chatlog.c +++ b/tests/unittests/chatlog/stub_chatlog.c @@ -21,8 +21,7 @@ */ #include -#include -#include +#include "prof_cmocka.h" #include diff --git a/tests/unittests/config/stub_accounts.c b/tests/unittests/config/stub_accounts.c index 981d0180..c805e3ba 100644 --- a/tests/unittests/config/stub_accounts.c +++ b/tests/unittests/config/stub_accounts.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "prof_cmocka.h" #include "common.h" #include "config/account.h" diff --git a/tests/unittests/database/stub_database.c b/tests/unittests/database/stub_database.c index c1e5c7b3..c3827b46 100644 --- a/tests/unittests/database/stub_database.c +++ b/tests/unittests/database/stub_database.c @@ -21,8 +21,7 @@ */ #include -#include -#include +#include "prof_cmocka.h" #include "database.h" diff --git a/tests/unittests/helpers.c b/tests/unittests/helpers.c index f567bcd5..83de34a0 100644 --- a/tests/unittests/helpers.c +++ b/tests/unittests/helpers.c @@ -1,8 +1,5 @@ -#include -#include -#include #include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/log/stub_log.c b/tests/unittests/log/stub_log.c index f0f67e47..aba5a603 100644 --- a/tests/unittests/log/stub_log.c +++ b/tests/unittests/log/stub_log.c @@ -20,10 +20,8 @@ * */ -#include #include -#include -#include +#include "prof_cmocka.h" #include "log.h" diff --git a/tests/unittests/otr/stub_otr.c b/tests/unittests/otr/stub_otr.c index 291db41c..8069ee7d 100644 --- a/tests/unittests/otr/stub_otr.c +++ b/tests/unittests/otr/stub_otr.c @@ -2,10 +2,7 @@ #include #include -#include -#include -#include -#include +#include "prof_cmocka.h" #include "config/account.h" diff --git a/tests/unittests/test_autocomplete.c b/tests/unittests/test_autocomplete.c index 0e307351..3988aaa4 100644 --- a/tests/unittests/test_autocomplete.c +++ b/tests/unittests/test_autocomplete.c @@ -1,9 +1,5 @@ #include -#include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include "xmpp/contact.h" diff --git a/tests/unittests/test_callbacks.c b/tests/unittests/test_callbacks.c index 678c6415..9796f489 100644 --- a/tests/unittests/test_callbacks.c +++ b/tests/unittests/test_callbacks.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_chat_session.c b/tests/unittests/test_chat_session.c index 2de18c08..86ce0743 100644 --- a/tests/unittests/test_chat_session.c +++ b/tests/unittests/test_chat_session.c @@ -1,10 +1,6 @@ -#include #include -#include -#include -#include +#include "prof_cmocka.h" #include -#include #include "xmpp/chat_session.h" diff --git a/tests/unittests/test_cmd_account.c b/tests/unittests/test_cmd_account.c index 76f5a594..46783820 100644 --- a/tests/unittests/test_cmd_account.c +++ b/tests/unittests/test_cmd_account.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_alias.c b/tests/unittests/test_cmd_alias.c index d23816bd..c86733a2 100644 --- a/tests/unittests/test_cmd_alias.c +++ b/tests/unittests/test_cmd_alias.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_bookmark.c b/tests/unittests/test_cmd_bookmark.c index c77e0bf1..168ce8ce 100644 --- a/tests/unittests/test_cmd_bookmark.c +++ b/tests/unittests/test_cmd_bookmark.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_connect.c b/tests/unittests/test_cmd_connect.c index 98e1884d..7f6d54ea 100644 --- a/tests/unittests/test_cmd_connect.c +++ b/tests/unittests/test_cmd_connect.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_disconnect.c b/tests/unittests/test_cmd_disconnect.c index 227c7fbc..e524577a 100644 --- a/tests/unittests/test_cmd_disconnect.c +++ b/tests/unittests/test_cmd_disconnect.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/unittests/test_cmd_join.c b/tests/unittests/test_cmd_join.c index e933dc89..75440332 100644 --- a/tests/unittests/test_cmd_join.c +++ b/tests/unittests/test_cmd_join.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c index 7824cd9d..7c1850df 100644 --- a/tests/unittests/test_cmd_otr.c +++ b/tests/unittests/test_cmd_otr.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_pgp.c b/tests/unittests/test_cmd_pgp.c index 35df812f..71253c49 100644 --- a/tests/unittests/test_cmd_pgp.c +++ b/tests/unittests/test_cmd_pgp.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_presence.c b/tests/unittests/test_cmd_presence.c index 3d157ff1..8d386097 100644 --- a/tests/unittests/test_cmd_presence.c +++ b/tests/unittests/test_cmd_presence.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_rooms.c b/tests/unittests/test_cmd_rooms.c index 0800bf20..ef2e6b48 100644 --- a/tests/unittests/test_cmd_rooms.c +++ b/tests/unittests/test_cmd_rooms.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_roster.c b/tests/unittests/test_cmd_roster.c index d848235b..aadfedc4 100644 --- a/tests/unittests/test_cmd_roster.c +++ b/tests/unittests/test_cmd_roster.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_cmd_sub.c b/tests/unittests/test_cmd_sub.c index d03f6b5c..a24e13aa 100644 --- a/tests/unittests/test_cmd_sub.c +++ b/tests/unittests/test_cmd_sub.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c index e340fcf3..889b2202 100644 --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -1,11 +1,7 @@ #include "xmpp/resource.h" #include "common.h" -#include -#include -#include -#include +#include "prof_cmocka.h" #include -#include void replace_one_substr(void** state) diff --git a/tests/unittests/test_contact.c b/tests/unittests/test_contact.c index 849c9bc0..3f6caa12 100644 --- a/tests/unittests/test_contact.c +++ b/tests/unittests/test_contact.c @@ -1,9 +1,6 @@ #include -#include #include -#include -#include -#include +#include "prof_cmocka.h" #include #include "xmpp/contact.h" diff --git a/tests/unittests/test_form.c b/tests/unittests/test_form.c index 88bf9d55..583babf3 100644 --- a/tests/unittests/test_form.c +++ b/tests/unittests/test_form.c @@ -1,8 +1,5 @@ -#include #include -#include -#include -#include +#include "prof_cmocka.h" #include #include "xmpp/form.h" diff --git a/tests/unittests/test_jid.c b/tests/unittests/test_jid.c index 77886e4a..7bc2137e 100644 --- a/tests/unittests/test_jid.c +++ b/tests/unittests/test_jid.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include "xmpp/jid.h" diff --git a/tests/unittests/test_keyhandlers.c b/tests/unittests/test_keyhandlers.c index 6d95f0cb..ff7d6a93 100644 --- a/tests/unittests/test_keyhandlers.c +++ b/tests/unittests/test_keyhandlers.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include diff --git a/tests/unittests/test_muc.c b/tests/unittests/test_muc.c index 57fd79e8..bf396619 100644 --- a/tests/unittests/test_muc.c +++ b/tests/unittests/test_muc.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include "xmpp/muc.h" diff --git a/tests/unittests/test_parser.c b/tests/unittests/test_parser.c index 8019097d..2783e8d0 100644 --- a/tests/unittests/test_parser.c +++ b/tests/unittests/test_parser.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include "tools/parser.h" diff --git a/tests/unittests/test_plugins_disco.c b/tests/unittests/test_plugins_disco.c index 880a09b1..a21ae94c 100644 --- a/tests/unittests/test_plugins_disco.c +++ b/tests/unittests/test_plugins_disco.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include "plugins/disco.h" diff --git a/tests/unittests/test_preferences.c b/tests/unittests/test_preferences.c index 1eb2ba36..7c662a34 100644 --- a/tests/unittests/test_preferences.c +++ b/tests/unittests/test_preferences.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/test_roster_list.c b/tests/unittests/test_roster_list.c index 185a9c72..7fbaf394 100644 --- a/tests/unittests/test_roster_list.c +++ b/tests/unittests/test_roster_list.c @@ -1,11 +1,7 @@ #include -#include #include -#include -#include -#include +#include "prof_cmocka.h" #include -#include #include "xmpp/contact.h" #include "xmpp/roster_list.h" diff --git a/tests/unittests/test_server_events.c b/tests/unittests/test_server_events.c index fbed077a..4f00fd1b 100644 --- a/tests/unittests/test_server_events.c +++ b/tests/unittests/test_server_events.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 6ee0ed25..aed9830c 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -3,8 +3,7 @@ #include #include -#include -#include +#include "prof_cmocka.h" #include "ui/window.h" #include "ui/ui.h" diff --git a/tests/unittests/unittests.c b/tests/unittests/unittests.c index e0d4d792..5e6833fe 100644 --- a/tests/unittests/unittests.c +++ b/tests/unittests/unittests.c @@ -1,10 +1,7 @@ -#include #include #include #include -#include -#include -#include +#include "prof_cmocka.h" #include #include #include diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c index 366f26b3..fd47bce2 100644 --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include "prof_cmocka.h" #include "xmpp/xmpp.h" -- 2.49.1 From 7f48452d84c052927b25975052e578d325a147a6 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 20 Aug 2025 16:09:13 +0200 Subject: [PATCH 018/338] Don't use `memchr()` on strings potentially shorter than 4 bytes. When running profanity under Valgrind with slashguard enabled, the following error could occur: ``` [...] ==4021347== Invalid read of size 1 ==4021347== at 0x4851F49: memchr (vg_replace_strmem.c:986) ==4021347== by 0x45CEAD: _inp_slashguard_check (inputwin.c:183) ==4021347== by 0x45CEAD: inp_readline (inputwin.c:225) ==4021347== by 0x431184: prof_run (profanity.c:121) ==4021347== by 0x42C609: main (main.c:176) ==4021347== Address 0xe850883 is 0 bytes after a block of size 3 alloc'd ==4021347== at 0x48477C4: malloc (vg_replace_malloc.c:446) [...] ``` `memchr()` requires the complete memory that shall be searched to be accessible. Using `strchr()` could work for shorter strings, but we only want to search in the first 4 chars. Instead of somehow working around those limitations, simply search manually in the first 4 bytes. Fixes: 3c56b289 ("Add slashguard feature") Signed-off-by: Steffen Jaeckel --- src/ui/inputwin.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 0bc7c6f8..40200c48 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -180,11 +180,15 @@ _inp_slashguard_check(void) return false; if (!prefs_get_boolean(PREF_SLASH_GUARD)) return false; - if (memchr(inp_line + 1, '/', 3)) { - cons_show("Your text contains a slash in the first 4 characters"); - free(inp_line); - inp_line = NULL; - return true; + size_t n = 1; + while (inp_line[n] != '\0' && n < 4) { + if (inp_line[n] == '/') { + cons_show("Your text contains a slash in the first 4 characters"); + free(inp_line); + inp_line = NULL; + return true; + } + n++; } return false; } -- 2.49.1 From f1e12a33cf64eddc936a3b9f5e214f0ecb7d375e Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 21 Aug 2025 09:19:31 +0200 Subject: [PATCH 019/338] Rename issue template Seems like GH changed how the templates work. --- .github/{ISSUE_TEMPLATE => issue_template.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ISSUE_TEMPLATE => issue_template.md} (100%) diff --git a/.github/ISSUE_TEMPLATE b/.github/issue_template.md similarity index 100% rename from .github/ISSUE_TEMPLATE rename to .github/issue_template.md -- 2.49.1 From 5dcbd84f758ac6f9d2eb26c5579421040ba8fe31 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 21 Aug 2025 09:23:45 +0200 Subject: [PATCH 020/338] Update issue templates According to the new way: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates --- .github/ISSUE_TEMPLATE/bug_report.md | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..b554ac1d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,44 @@ +--- +name: Bug report +about: Create a report +title: '' +labels: bug +assignees: '' + +--- + + + + + + +## Expected Behavior + + + +## Current Behavior + + + +## Possible Solution + + + +## Steps to Reproduce (for bugs) + + +1. +2. +3. +4. + +## Context + + +## Environment +* Give us the version and build information output generated by `profanity -v` +* If you could not yet build profanity, mention the revision you try to build from +* Operating System/Distribution +* glib version +* libstrophe version +* Some bugs might be due to specific implementation in the server. `/serversoftware example.domain` can be helpful -- 2.49.1 From 41c47f432d223789fb3e9951bf531d52e9a6bd36 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 21 Aug 2025 09:24:45 +0200 Subject: [PATCH 021/338] Delete old file --- .github/issue_template.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .github/issue_template.md diff --git a/.github/issue_template.md b/.github/issue_template.md deleted file mode 100644 index a95dfa66..00000000 --- a/.github/issue_template.md +++ /dev/null @@ -1,36 +0,0 @@ - - - - - -## Expected Behavior - - - -## Current Behavior - - - -## Possible Solution - - - -## Steps to Reproduce (for bugs) - - -1. -2. -3. -4. - -## Context - - -## Environment -* Give us the version and build information output generated by `profanity -v` -* If you could not yet build profanity, mention the revision you try to build from -* Operating System/Distribution -* glib version -* libstrophe version -* Some bugs might be due to specific implementation in the server. `/serversoftware example.domain` can be helpful - -- 2.49.1 From 26dbdb31c63521e8f2c27ac635dacb24a22d6871 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 21 Aug 2025 09:26:17 +0200 Subject: [PATCH 022/338] Add feature request template --- .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..4fe86d5e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. -- 2.49.1 From b12521ca21096c54a1ea2bf1ef67ceae1f6c6133 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 21 Aug 2025 10:28:02 +0200 Subject: [PATCH 023/338] If config keyfile does not exist, create it. Fixes #1911 Alternative to #2056 Signed-off-by: Steffen Jaeckel --- src/common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common.c b/src/common.c index 349b7b7c..22cf750c 100644 --- a/src/common.c +++ b/src/common.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -199,6 +200,10 @@ load_custom_keyfile(prof_keyfile_t* keyfile, gchar* filename) if (g_file_test(keyfile->filename, G_FILE_TEST_EXISTS)) { g_chmod(keyfile->filename, S_IRUSR | S_IWUSR); + } else { + int fno = g_creat(keyfile->filename, S_IRUSR | S_IWUSR); + if (fno != -1) + g_close(fno, NULL); } return _load_keyfile(keyfile); -- 2.49.1 From c01b531fe2633168b747a731a27a7b089a5b5256 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 22 Aug 2025 09:23:01 +0200 Subject: [PATCH 024/338] Release 0.15.1 --- CHANGELOG | 22 ++ configure.ac | 4 +- docs/profanity-about.1 | 12 + docs/profanity-account.1 | 388 +++++++++++++++++++++++ docs/profanity-affiliation.1 | 43 +++ docs/profanity-alias.1 | 55 ++++ docs/profanity-autoaway.1 | 93 ++++++ docs/profanity-autoconnect.1 | 35 +++ docs/profanity-autoping.1 | 27 ++ docs/profanity-avatar.1 | 57 ++++ docs/profanity-ban.1 | 24 ++ docs/profanity-beep.1 | 19 ++ docs/profanity-blocked.1 | 57 ++++ docs/profanity-bookmark.1 | 124 ++++++++ docs/profanity-caps.1 | 38 +++ docs/profanity-carbons.1 | 19 ++ docs/profanity-changepassword.1 | 12 + docs/profanity-charset.1 | 12 + docs/profanity-clear.1 | 33 ++ docs/profanity-close.1 | 75 +++++ docs/profanity-cmd.1 | 35 +++ docs/profanity-color.1 | 41 +++ docs/profanity-connect.1 | 98 ++++++ docs/profanity-console.1 | 70 +++++ docs/profanity-correct-editor.1 | 12 + docs/profanity-correct.1 | 19 ++ docs/profanity-correction.1 | 27 ++ docs/profanity-disco.1 | 41 +++ docs/profanity-disconnect.1 | 12 + docs/profanity-editor.1 | 12 + docs/profanity-executable.1 | 120 ++++++++ docs/profanity-export.1 | 27 ++ docs/profanity-flash.1 | 19 ++ docs/profanity-form.1 | 43 +++ docs/profanity-gone.1 | 19 ++ docs/profanity-help.1 | 48 +++ docs/profanity-history.1 | 19 ++ docs/profanity-info.1 | 35 +++ docs/profanity-inpblock.1 | 27 ++ docs/profanity-inputwin.1 | 27 ++ docs/profanity-intype.1 | 24 ++ docs/profanity-invite.1 | 46 +++ docs/profanity-join.1 | 49 +++ docs/profanity-kick.1 | 24 ++ docs/profanity-lastactivity.1 | 44 +++ docs/profanity-log.1 | 51 ++++ docs/profanity-logging.1 | 32 ++ docs/profanity-mainwin.1 | 27 ++ docs/profanity-mam.1 | 19 ++ docs/profanity-mood.1 | 46 +++ docs/profanity-msg.1 | 51 ++++ docs/profanity-nick.1 | 19 ++ docs/profanity-notify.1 | 240 +++++++++++++++ docs/profanity-occupants.1 | 125 ++++++++ docs/profanity-omemo.1 | 136 +++++++++ docs/profanity-otr.1 | 182 +++++++++++ docs/profanity-outtype.1 | 19 ++ docs/profanity-ox-setup.1 | 2 +- docs/profanity-paste.1 | 12 + docs/profanity-pgp.1 | 118 +++++++ docs/profanity-ping.1 | 19 ++ docs/profanity-plugins.1 | 96 ++++++ docs/profanity-prefs.1 | 59 ++++ docs/profanity-presence.1 | 87 ++++++ docs/profanity-priority.1 | 19 ++ docs/profanity-privacy.1 | 35 +++ docs/profanity-privileges.1 | 19 ++ docs/profanity-quit.1 | 12 + docs/profanity-receipts.1 | 27 ++ docs/profanity-reconnect.1 | 27 ++ docs/profanity-redraw.1 | 12 + docs/profanity-register.1 | 68 +++++ docs/profanity-reload.1 | 12 + docs/profanity-resource.1 | 43 +++ docs/profanity-role.1 | 27 ++ docs/profanity-room.1 | 29 ++ docs/profanity-rooms.1 | 60 ++++ docs/profanity-roster.1 | 525 ++++++++++++++++++++++++++++++++ docs/profanity-save.1 | 12 + docs/profanity-script.1 | 46 +++ docs/profanity-sendfile.1 | 27 ++ docs/profanity-serversoftware.1 | 27 ++ docs/profanity-silence.1 | 12 + docs/profanity-slashguard.1 | 19 ++ docs/profanity-software.1 | 38 +++ docs/profanity-splash.1 | 19 ++ docs/profanity-stamp.1 | 46 +++ docs/profanity-states.1 | 19 ++ docs/profanity-status.1 | 48 +++ docs/profanity-statusbar.1 | 124 ++++++++ docs/profanity-strophe.1 | 35 +++ docs/profanity-sub.1 | 73 +++++ docs/profanity-subject.1 | 59 ++++ docs/profanity-theme.1 | 59 ++++ docs/profanity-time.1 | 142 +++++++++ docs/profanity-titlebar.1 | 67 ++++ docs/profanity-tls.1 | 104 +++++++ docs/profanity-tray.1 | 35 +++ docs/profanity-url.1 | 35 +++ docs/profanity-vcard.1 | 400 ++++++++++++++++++++++++ docs/profanity-vercheck.1 | 19 ++ docs/profanity-who.1 | 83 +++++ docs/profanity-win.1 | 98 ++++++ docs/profanity-wins.1 | 46 +++ docs/profanity-wintitle.1 | 27 ++ docs/profanity-wrap.1 | 19 ++ docs/profanity-xmlconsole.1 | 12 + docs/profanity.1 | 2 +- profanity.doap | 5 + 109 files changed, 6095 insertions(+), 4 deletions(-) create mode 100644 docs/profanity-about.1 create mode 100644 docs/profanity-account.1 create mode 100644 docs/profanity-affiliation.1 create mode 100644 docs/profanity-alias.1 create mode 100644 docs/profanity-autoaway.1 create mode 100644 docs/profanity-autoconnect.1 create mode 100644 docs/profanity-autoping.1 create mode 100644 docs/profanity-avatar.1 create mode 100644 docs/profanity-ban.1 create mode 100644 docs/profanity-beep.1 create mode 100644 docs/profanity-blocked.1 create mode 100644 docs/profanity-bookmark.1 create mode 100644 docs/profanity-caps.1 create mode 100644 docs/profanity-carbons.1 create mode 100644 docs/profanity-changepassword.1 create mode 100644 docs/profanity-charset.1 create mode 100644 docs/profanity-clear.1 create mode 100644 docs/profanity-close.1 create mode 100644 docs/profanity-cmd.1 create mode 100644 docs/profanity-color.1 create mode 100644 docs/profanity-connect.1 create mode 100644 docs/profanity-console.1 create mode 100644 docs/profanity-correct-editor.1 create mode 100644 docs/profanity-correct.1 create mode 100644 docs/profanity-correction.1 create mode 100644 docs/profanity-disco.1 create mode 100644 docs/profanity-disconnect.1 create mode 100644 docs/profanity-editor.1 create mode 100644 docs/profanity-executable.1 create mode 100644 docs/profanity-export.1 create mode 100644 docs/profanity-flash.1 create mode 100644 docs/profanity-form.1 create mode 100644 docs/profanity-gone.1 create mode 100644 docs/profanity-help.1 create mode 100644 docs/profanity-history.1 create mode 100644 docs/profanity-info.1 create mode 100644 docs/profanity-inpblock.1 create mode 100644 docs/profanity-inputwin.1 create mode 100644 docs/profanity-intype.1 create mode 100644 docs/profanity-invite.1 create mode 100644 docs/profanity-join.1 create mode 100644 docs/profanity-kick.1 create mode 100644 docs/profanity-lastactivity.1 create mode 100644 docs/profanity-log.1 create mode 100644 docs/profanity-logging.1 create mode 100644 docs/profanity-mainwin.1 create mode 100644 docs/profanity-mam.1 create mode 100644 docs/profanity-mood.1 create mode 100644 docs/profanity-msg.1 create mode 100644 docs/profanity-nick.1 create mode 100644 docs/profanity-notify.1 create mode 100644 docs/profanity-occupants.1 create mode 100644 docs/profanity-omemo.1 create mode 100644 docs/profanity-otr.1 create mode 100644 docs/profanity-outtype.1 create mode 100644 docs/profanity-paste.1 create mode 100644 docs/profanity-pgp.1 create mode 100644 docs/profanity-ping.1 create mode 100644 docs/profanity-plugins.1 create mode 100644 docs/profanity-prefs.1 create mode 100644 docs/profanity-presence.1 create mode 100644 docs/profanity-priority.1 create mode 100644 docs/profanity-privacy.1 create mode 100644 docs/profanity-privileges.1 create mode 100644 docs/profanity-quit.1 create mode 100644 docs/profanity-receipts.1 create mode 100644 docs/profanity-reconnect.1 create mode 100644 docs/profanity-redraw.1 create mode 100644 docs/profanity-register.1 create mode 100644 docs/profanity-reload.1 create mode 100644 docs/profanity-resource.1 create mode 100644 docs/profanity-role.1 create mode 100644 docs/profanity-room.1 create mode 100644 docs/profanity-rooms.1 create mode 100644 docs/profanity-roster.1 create mode 100644 docs/profanity-save.1 create mode 100644 docs/profanity-script.1 create mode 100644 docs/profanity-sendfile.1 create mode 100644 docs/profanity-serversoftware.1 create mode 100644 docs/profanity-silence.1 create mode 100644 docs/profanity-slashguard.1 create mode 100644 docs/profanity-software.1 create mode 100644 docs/profanity-splash.1 create mode 100644 docs/profanity-stamp.1 create mode 100644 docs/profanity-states.1 create mode 100644 docs/profanity-status.1 create mode 100644 docs/profanity-statusbar.1 create mode 100644 docs/profanity-strophe.1 create mode 100644 docs/profanity-sub.1 create mode 100644 docs/profanity-subject.1 create mode 100644 docs/profanity-theme.1 create mode 100644 docs/profanity-time.1 create mode 100644 docs/profanity-titlebar.1 create mode 100644 docs/profanity-tls.1 create mode 100644 docs/profanity-tray.1 create mode 100644 docs/profanity-url.1 create mode 100644 docs/profanity-vcard.1 create mode 100644 docs/profanity-vercheck.1 create mode 100644 docs/profanity-who.1 create mode 100644 docs/profanity-win.1 create mode 100644 docs/profanity-wins.1 create mode 100644 docs/profanity-wintitle.1 create mode 100644 docs/profanity-wrap.1 create mode 100644 docs/profanity-xmlconsole.1 diff --git a/CHANGELOG b/CHANGELOG index 97cfcb5e..528f37ac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,25 @@ +0.15.1 (2025-08-22) +=================== + +5 people contributed to this release: @andreasstieger, @killerdevildog, @mdosch, +@sjaeckel and @jubalh. + +Thanks a lot to our sponsors: Matthew Fennell, Martin Dosch and one anonymous sponsor. +If you want to support us too: https://profanity-im.github.io/donate.html + +This release depends on libstrophe >= 0.12.3. + +Changes: +- Add `iso8601` as valid time format + `/time all set iso8601` instead of manual specification +- Fix ignoring of roster pushes (#2035) +- Print location of decrypted files (#2041) +- Fix GPGME >= 2.0.0 compatibility issue (#2048) +- Fix tests with gcc15 and uintptr_t (#2055) +- Reduce noise in log files (#1911, #2060) +- Cleanup, code improvement and memory fixes (#2033, #2041, #2053) +- Improve documentation (#2040, 18f157b, #2058) + 0.15.0 (2025-03-27) =================== diff --git a/configure.ac b/configure.ac index e52fc8fc..101441ca 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([profanity],[0.15.0],[jubalh@iodoru.org],[profanity],[https://profanity-im.github.io/]) +AC_INIT([profanity],[0.15.1],[jubalh@iodoru.org],[profanity],[https://profanity-im.github.io/]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/main.c]) @@ -24,7 +24,7 @@ AS_CASE([$target_os], AM_INIT_AUTOMAKE([foreign subdir-objects]) -PACKAGE_STATUS="development" +PACKAGE_STATUS="release" ## Get git branch and revision if in development if test "x$PACKAGE_STATUS" = xdevelopment; then diff --git a/docs/profanity-about.1 b/docs/profanity-about.1 new file mode 100644 index 00000000..787cdbda --- /dev/null +++ b/docs/profanity-about.1 @@ -0,0 +1,12 @@ +.TH man 1 "2025-08-22" "0.15.0" "Profanity XMPP client" + +.SH NAME +/about + +.SH DESCRIPTION +Show version and license information. + +.SH SYNOPSIS +/about + +.LP diff --git a/docs/profanity-account.1 b/docs/profanity-account.1 new file mode 100644 index 00000000..909e1e21 --- /dev/null +++ b/docs/profanity-account.1 @@ -0,0 +1,388 @@ +.TH man 1 "2025-08-22" "0.15.0" "Profanity XMPP client" + +.SH NAME +/account + +.SH DESCRIPTION +Commands for creating and managing accounts. Calling with no arguments will display information for the current account. + +.SH SYNOPSIS +/account + +.LP +/account list + +.LP +/account show + +.LP +/account enable|disable + +.LP +/account default set + +.LP +/account default off + +.LP +/account add + +.LP +/account remove + +.LP +/account rename + +.LP +/account set jid + +.LP +/account set server + +.LP +/account set port + +.LP +/account set status + +.LP +/account set status last + +.LP +/account set + +.LP +/account set resource + +.LP +/account set password + +.LP +/account set eval_password + +.LP +/account set muc + +.LP +/account set nick + +.LP +/account set otr + +.LP +/account set pgpkeyid + +.LP +/account set startscript