From fcb2681b7b3f221160fac027731fc3688d73d59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 24 Jun 2016 11:24:40 +0200 Subject: Log a warning when we receive an iq without a from --- src/xmpp/biboumi_component.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp index e4d4899..a6aac21 100644 --- a/src/xmpp/biboumi_component.cpp +++ b/src/xmpp/biboumi_component.cpp @@ -285,8 +285,10 @@ void BiboumiComponent::handle_iq(const Stanza& stanza) std::string to_str = stanza.get_tag("to"); std::string type = stanza.get_tag("type"); - if (from.empty()) + if (from.empty()) { + log_warning("Received an iq without a 'from'. Ignoring."); return; + } if (id.empty() || to_str.empty() || type.empty()) { this->send_stanza_error("iq", from, this->served_hostname, id, -- cgit v1.2.3