Software /
code /
prosody-modules
Diff
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 |
line wrap: on
line diff
--- a/mod_muc_http_auth/mod_muc_http_auth.lua Thu Sep 23 16:41:42 2021 +0200 +++ b/mod_muc_http_auth/mod_muc_http_auth.lua Thu Sep 23 17:13:35 2021 +0200 @@ -58,7 +58,7 @@ -- Nickname is mandatory to enter a MUC if not user_nickname then return; end - local url = authorization_url .. "?userJID=" .. user_bare_jid .."&mucJID=" .. room.jid .. "&nickname=" .. user_nickname; + local url = authorization_url .. "?userJID=" .. urlencode(user_bare_jid) .."&mucJID=" .. urlencode(room.jid) .. "&nickname=" .. urlencode(user_nickname); local result = wait_for(http.request(url, options):next(handle_success, handle_error)); local response, err = result.response, result.err;