summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-01-18 19:34:56 +0100
committerlouiz’ <louiz@louiz.org>2018-01-18 19:34:56 +0100
commitf371d9ca46578a722d2ce0d4a88ea35f64dd1d1c (patch)
treea75c3363cb182f0c18ad7638409440027bba07f9 /src/xmpp
parent6e1af8b082379a2cf0aafc8c7929bea465b9d8aa (diff)
downloadbiboumi-f371d9ca46578a722d2ce0d4a88ea35f64dd1d1c.tar.gz
biboumi-f371d9ca46578a722d2ce0d4a88ea35f64dd1d1c.tar.bz2
biboumi-f371d9ca46578a722d2ce0d4a88ea35f64dd1d1c.tar.xz
biboumi-f371d9ca46578a722d2ce0d4a88ea35f64dd1d1c.zip
xep-0106 escape the JIDs listed in a disco#items server query
fix #3325
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/biboumi_component.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index 8775869..a0e52e6 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -7,6 +7,7 @@
#include <xmpp/adhoc_command.hpp>
#include <xmpp/biboumi_adhoc_commands.hpp>
#include <bridge/list_element.hpp>
+#include <utils/encoding.hpp>
#include <config/config.hpp>
#include <utils/time.hpp>
#include <xmpp/jid.hpp>
@@ -1010,7 +1011,9 @@ void BiboumiComponent::send_iq_room_list_result(const std::string& id, const std
for (auto it = begin; it != end; ++it)
{
XmlSubNode item(query, "item");
- item["jid"] = it->channel + "@" + this->served_hostname;
+ std::string channel_name = it->channel;
+ xep0106::encode(channel_name);
+ item["jid"] = channel_name + "@" + this->served_hostname;
}
if ((rs_info.max >= 0 || !rs_info.after.empty() || !rs_info.before.empty()))