From ed44d7ad96fdc0896d1a9cbf4b309ea8179f5c4c Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 9 Apr 2025 16:40:33 +0200 Subject: [PATCH] Fix handling of roster pushes We must only return early in cases where we received a roster push with 1. a `from` attribute 2. that `from` is not our bare JID The server sends roster pushes without `from` attribute and we must accept them. Fixes #2035 Fixes: bac24601da ("Introduce `equals_our_barejid()`") Signed-off-by: Steffen Jaeckel --- src/xmpp/roster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index dac0d735..a760a888 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -201,7 +201,7 @@ roster_set_handler(xmpp_stanza_t* const stanza) // if from attribute exists and it is not current users barejid, ignore push const char* from = xmpp_stanza_get_from(stanza); - if (!equals_our_barejid(from)) { + if (from && !equals_our_barejid(from)) { log_warning("Received alleged roster push from: %s", from); return; }