mod_http_xep227: Correctly read selected stores from URL query part
authorMatthew Wild <mwild1@gmail.com>
Sun, 16 Jan 2022 15:01:53 +0000
changeset 4876 bc54f651b5a4
parent 4875 029ae3c29683
child 4877 541b2cf68e93
mod_http_xep227: Correctly read selected stores from URL query part
mod_http_xep227/mod_http_xep227.lua
--- a/mod_http_xep227/mod_http_xep227.lua	Sun Jan 16 15:01:20 2022 +0000
+++ b/mod_http_xep227/mod_http_xep227.lua	Sun Jan 16 15:01:53 2022 +0000
@@ -184,7 +184,8 @@
 
 	local xep227_driver = sm.load_driver(session.host, "xep0227");
 
-	local selected_stores = get_selected_stores(event.request.url.query);
+	local query_params = http.formdecode(event.request.url.query or "");
+	local selected_stores = get_selected_stores(query_params);
 
 	for _, store_name in ipairs(selected_stores.keyval) do
 		-- Initialize the destination store (XEP-0227 backed)