Skip to content

Commit

Permalink
Fix arg fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
tomachalek committed Aug 1, 2023
1 parent eeb14a5 commit 4b0913a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/ucnk_dispatch_hook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b0913a

Please sign in to comment.