Skip to content

Commit ed44d7a

Browse files
committed
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: bac2460 ("Introduce `equals_our_barejid()`") Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 5efec67 commit ed44d7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xmpp/roster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ roster_set_handler(xmpp_stanza_t* const stanza)
201201

202202
// if from attribute exists and it is not current users barejid, ignore push
203203
const char* from = xmpp_stanza_get_from(stanza);
204-
if (!equals_our_barejid(from)) {
204+
if (from && !equals_our_barejid(from)) {
205205
log_warning("Received alleged roster push from: %s", from);
206206
return;
207207
}

0 commit comments

Comments
 (0)