changeset 5143:1cae382e88a1

mod_invites_api: Fix traceback when no query params (thanks Menel)
author Matthew Wild <mwild1@gmail.com>
date Wed, 11 Jan 2023 10:09:12 +0000
parents 410d7c8d210d
children 606f6c6535bb
files mod_invites_api/mod_invites_api.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites_api/mod_invites_api.lua	Wed Jan 11 09:59:55 2023 +0000
+++ b/mod_invites_api/mod_invites_api.lua	Wed Jan 11 10:09:12 2023 +0000
@@ -15,7 +15,7 @@
 	local auth_header = request.headers.authorization;
 
 	if not auth_header then
-		params = params or http_formdecode(request.url.query);
+		params = params or http_formdecode(request.url.query or "=");
 		combined_key = params.key;
 	else
 		local auth_type, value = auth_header:match("^(%S+)%s(%S+)$");