summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-06-24 11:24:40 +0200
committerlouiz’ <louiz@louiz.org>2016-06-24 11:24:40 +0200
commitfcb2681b7b3f221160fac027731fc3688d73d59d (patch)
tree3fde186fd08b6a49c20aaa148712566a983be06d /src/xmpp
parent7d2a2dc8cc9d2d9bcd83fb1bd869c29322855fa8 (diff)
downloadbiboumi-fcb2681b7b3f221160fac027731fc3688d73d59d.tar.gz
biboumi-fcb2681b7b3f221160fac027731fc3688d73d59d.tar.bz2
biboumi-fcb2681b7b3f221160fac027731fc3688d73d59d.tar.xz
biboumi-fcb2681b7b3f221160fac027731fc3688d73d59d.zip
Log a warning when we receive an iq without a from
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/biboumi_component.cpp4
1 files changed, 3 insertions, 1 deletions
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,