Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

bug: json input not validated correctly #79

Open
sentry-io bot opened this issue Jul 30, 2021 · 0 comments
Open

bug: json input not validated correctly #79

sentry-io bot opened this issue Jul 30, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 30, 2021

The json input is not validated to be an object, so it is possible that it is parsed to return an integer. This causes an error because it is not possible to check if a string is 'in' an integer.

Sentry Issue: MESSAGE-MANAGER-BOT-4

TypeError: argument of type 'int' is not iterable
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/admin/bot/message-bot/cogs/messages.py", line 771, in send_json_embed
    if "embeds" in dict_content or "content" in dict_content:

CommandInvokeError: Command raised an exception: TypeError: argument of type 'int' is not iterable
  File "discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc

Ignoring exception in command send-embed-json:
@AnotherCat AnotherCat added bug Something isn't working error handling Involved with error handling labels Jul 30, 2021
@AnotherCat AnotherCat removed the error handling Involved with error handling label Jul 30, 2021
@AnotherCat AnotherCat moved this to Todo in Master Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Status: Todo
Development

No branches or pull requests

1 participant