mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 21:16:21 +00:00
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
|
// if from attribute exists and it is not current users barejid, ignore push
|
||||||
const char* from = xmpp_stanza_get_from(stanza);
|
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);
|
log_warning("Received alleged roster push from: %s", from);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user