MultiServer: Validate CreateHints status arg #5408

This commit is contained in:
qwint
2025-09-03 14:01:56 -05:00
committed by GitHub
parent 7a1311984f
commit 8f88152532

View File

@@ -1961,6 +1961,16 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
if not locations:
await ctx.send_msgs(client, [{"cmd": "InvalidPacket", "type": "arguments",
"text": "CreateHints: No locations specified.", "original_cmd": cmd}])
return
try:
status = HintStatus(status)
except ValueError as err:
await ctx.send_msgs(client,
[{"cmd": "InvalidPacket", "type": "arguments",
"text": f"Unknown Status: {err}",
"original_cmd": cmd}])
return
hints = []