From 4b0913a6c856f21405c65809773c73af3033d38d Mon Sep 17 00:00:00 2001 From: Tomas Machalek Date: Tue, 1 Aug 2023 17:09:16 +0200 Subject: [PATCH] Fix arg fetching --- lib/plugins/ucnk_dispatch_hook/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/ucnk_dispatch_hook/__init__.py b/lib/plugins/ucnk_dispatch_hook/__init__.py index 40744cb2a3..8b84460bc2 100644 --- a/lib/plugins/ucnk_dispatch_hook/__init__.py +++ b/lib/plugins/ucnk_dispatch_hook/__init__.py @@ -73,7 +73,8 @@ async def _check_client(self, plugin_ctx: PluginCtx): await self._db.hash_del(self.bot_clients_key, client_ip) async def pre_dispatch(self, plugin_ctx, action_props: ActionProps, request): - arg = request.args.get('corpname', [''])[0] + arg = request.args.getlist('corpname', [''])[0] + if arg.startswith('aranea/'): raise ImmediateRedirectException(plugin_ctx.updated_current_url(dict(corpname=arg[len('aranea/'):]))) await self._check_client(plugin_ctx)