Compare commits

..

2 Commits

Author SHA1 Message Date
4daaa38363 fix(xmpp): obfuscate client identity in protocol exchanges
All checks were successful
CI Code / Check spelling (pull_request) Successful in 13s
CI Code / Check coding style (pull_request) Successful in 24s
CI Code / Code Coverage (pull_request) Successful in 3m13s
CI Code / Linux (debian) (pull_request) Successful in 5m13s
CI Code / Linux (arch) (pull_request) Successful in 7m33s
CI Code / Linux (ubuntu) (pull_request) Successful in 8m38s
Modify version responses to return a generic client name and omit
version strings. Drop the "profanity." prefix from dynamically
generated JID resources. Clear the XEP-0115 capabilities node URI to
prevent service discovery fingerprinting. These adjustments reduce the
client's attack surface by minimizing identifiable metadata.
2026-07-09 20:47:22 +00:00
60e088ac3c feat(caps): add cache clearing to /caps
Add /caps clear to wipe the local capabilities cache.
Implement autocomplete for new subcommand.
2026-07-09 16:38:27 +00:00
2 changed files with 8 additions and 14 deletions

View File

@@ -277,11 +277,8 @@ caps_cache_clear(void)
{
g_hash_table_remove_all(jid_to_ver);
g_hash_table_remove_all(jid_to_caps);
if (caps_prof_keyfile.keyfile) {
g_key_file_free(caps_prof_keyfile.keyfile);
}
caps_prof_keyfile.keyfile = g_key_file_new();
cache = caps_prof_keyfile.keyfile;
cache = g_key_file_new();
caps_prof_keyfile.keyfile = cache;
save_keyfile(&caps_prof_keyfile);
}

View File

@@ -931,22 +931,19 @@ stanza_create_caps_query_element(xmpp_ctx_t* ctx)
xmpp_stanza_t* identity = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(identity, "identity");
xmpp_stanza_set_type(identity, "pc");
xmpp_stanza_set_attribute(identity, "category", "client");
xmpp_stanza_set_type(identity, "pc");
ProfAccount* account = accounts_get_account(session_get_account_name());
gchar* client = account->client;
bool is_custom_client = client != NULL;
auto_gchar gchar* name = g_strdup(account->client ? account->client : "Pidgin");
GString* name_str = g_string_new(is_custom_client ? client : "Pidgin");
if (account->client) {
gchar* space = strchr(name, ' ');
if (space) {
*space = '\0';
}
}
account_free(account);
xmpp_stanza_set_attribute(identity, "name", name);
xmpp_stanza_set_attribute(identity, "name", name_str->str);
g_string_free(name_str, TRUE);
xmpp_stanza_add_child(query, identity);
xmpp_stanza_release(identity);