Software /
code /
prosody-modules
Comparison
mod_muc_http_auth/mod_muc_http_auth.lua @ 4697:15c335dc196e
mod_muc_http_auth: Make sure query parameters are URL encoded
author | Seve Ferrer <seve@delape.net> |
---|---|
date | Thu, 23 Sep 2021 17:13:35 +0200 |
parent | 4696:6a05c9eb964e |
child | 4723:0a0334a3a784 |
comparison
equal
deleted
inserted
replaced
4696:6a05c9eb964e | 4697:15c335dc196e |
---|---|
56 local user_nickname = jid_resource(stanza.attr.to); | 56 local user_nickname = jid_resource(stanza.attr.to); |
57 | 57 |
58 -- Nickname is mandatory to enter a MUC | 58 -- Nickname is mandatory to enter a MUC |
59 if not user_nickname then return; end | 59 if not user_nickname then return; end |
60 | 60 |
61 local url = authorization_url .. "?userJID=" .. user_bare_jid .."&mucJID=" .. room.jid .. "&nickname=" .. user_nickname; | 61 local url = authorization_url .. "?userJID=" .. urlencode(user_bare_jid) .."&mucJID=" .. urlencode(room.jid) .. "&nickname=" .. urlencode(user_nickname); |
62 | 62 |
63 local result = wait_for(http.request(url, options):next(handle_success, handle_error)); | 63 local result = wait_for(http.request(url, options):next(handle_success, handle_error)); |
64 local response, err = result.response, result.err; | 64 local response, err = result.response, result.err; |
65 | 65 |
66 local verb = verbs[stanza.name]; | 66 local verb = verbs[stanza.name]; |