Skip to content


Check roster push authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Sep 10, 2019
1 parent 307f16c commit dd33f5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xmpp-vala/src/module/roster/module.vala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public class Module : XmppStreamModule, Iq.Handler {
public void on_iq_set(XmppStream stream, Iq.Stanza iq) {
StanzaNode? query_node = iq.stanza.get_subnode("query", NS_URI);
if (query_node == null) return;
if (!iq.from.equals(stream.get_flag(Bind.Flag.IDENTITY).my_jid.bare_jid)) {
warning("Received alledged roster push from %s, ignoring", iq.from.to_string());

Flag flag = stream.get_flag(Flag.IDENTITY);
Item item = new Item.from_stanza_node(query_node.get_subnode("item", NS_URI));
Expand Down

0 comments on commit dd33f5f

Please sign in to comment.