Skip to content

Commit

Permalink
Merge pull request #5986 from tomachalek/disp_hook_fix
Browse files Browse the repository at this point in the history
Fix arg fetching
  • Loading branch information
tomachalek authored Aug 1, 2023
2 parents eeb14a5 + 4b0913a commit a3eef1c
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 a3eef1c

Please sign in to comment.