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 <s@jaeckel.eu>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user