diff options
author | Kim Alvefur <zash@zash.se> | 2020-09-11 18:34:36 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-09-11 18:34:36 +0200 |
commit | 59cae27ea29cd4f4fb03e70add52f2ac7936836b (patch) | |
tree | 1e581665a3355b5835e8ef8efb573571036dcbd9 | |
parent | a87492d53c5691095337930bccafb1f5964206e5 (diff) | |
download | prosody-59cae27ea29cd4f4fb03e70add52f2ac7936836b.tar.gz prosody-59cae27ea29cd4f4fb03e70add52f2ac7936836b.zip |
mod_server_contact_info: Generate properly escaped URIs from 'admins'
-rw-r--r-- | plugins/mod_server_contact_info.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_server_contact_info.lua b/plugins/mod_server_contact_info.lua index df2f0842..42316078 100644 --- a/plugins/mod_server_contact_info.lua +++ b/plugins/mod_server_contact_info.lua @@ -8,6 +8,7 @@ local array = require "util.array"; local jid = require "util.jid"; +local url = require "socket.url"; -- Source: http://xmpp.org/registrar/formtypes.html#http:--jabber.org-network-serverinfo local form_layout = require "util.dataforms".new({ @@ -25,7 +26,7 @@ local form_layout = require "util.dataforms".new({ local admins = module:get_option_inherited_set("admins", {}); local contact_config = module:get_option("contact_info", { - admin = array.collect( admins / jid.prep / function(admin) return "xmpp:" .. admin; end); + admin = array.collect(admins / jid.prep / function(admin) return url.build({scheme = "xmpp"; path = admin}); end); }); module:add_extension(form_layout:form(contact_config, "result")); |