Skip to content

Sanitize bot output#1032

Merged
MarkKoz merged 9 commits into
python-discord:masterfrom
slushiegoose:sanitize-bot-output
Jul 14, 2020
Merged

Sanitize bot output#1032
MarkKoz merged 9 commits into
python-discord:masterfrom
slushiegoose:sanitize-bot-output

Conversation

@slushiegoose
Copy link
Copy Markdown
Contributor

Fixes #1031

This removes the argument from the BadArgument command and runs filters over !eval output, as requested.

@slushiegoose slushiegoose requested a review from a team as a code owner July 8, 2020 20:40
@slushiegoose slushiegoose requested review from Senjan21 and sco1 and removed request for a team July 8, 2020 20:40
@ghost ghost added the needs 2 approvals label Jul 8, 2020
sco1
sco1 previously requested changes Jul 8, 2020
Copy link
Copy Markdown
Contributor

@sco1 sco1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only fixes one possible path in the error handler, not all of them, and also has missed the docs cog. Forget it

@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 2 approvals labels Jul 8, 2020
@slushiegoose
Copy link
Copy Markdown
Contributor Author

This only fixes one possible path in the error handler, not all of them,

this is the only path that repeats the argument

also has missed the docs cog.

lemon mentioned in #1031 (comment) that the docs don't actually circumvent it very efficiently so it isn't really a problem

Copy link
Copy Markdown
Contributor

@lemonsaurus lemonsaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is more or less a complete solution. There may be edge cases that aren't caught by this, but it's a big enough step in the right direction that I'm comfortable moving forward with it.

The code quality is quite excellent, too. Nice work.

Comment thread bot/cogs/error_handler.py Outdated
@sco1 sco1 dismissed their stale review July 9, 2020 12:58

Never mind

@ghost ghost added needs 1 approval and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Jul 9, 2020
slushiegoose and others added 2 commits July 9, 2020 15:29
@lemonsaurus
Copy link
Copy Markdown
Contributor

@slushiegoose Can you sort out the failing test?

Comment thread bot/cogs/snekbox.py
Comment thread bot/cogs/filtering.py Outdated
Comment thread bot/cogs/filtering.py
Comment thread bot/cogs/snekbox.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 1 approval labels Jul 12, 2020
@MarkKoz MarkKoz added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) p: 0 - critical Needs to be addressed ASAP t: bug Something isn't working labels Jul 13, 2020
@ghost ghost removed the s: waiting for author Waiting for author to address a review or respond to a comment label Jul 13, 2020
@ghost ghost added the needs 1 approval label Jul 13, 2020
Comment thread bot/cogs/filtering.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 1 approval labels Jul 13, 2020
@ghost ghost added needs 1 approval and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Jul 13, 2020
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Thanks!

@ghost ghost removed the needs 1 approval label Jul 14, 2020
@MarkKoz MarkKoz merged commit 74bba37 into python-discord:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) p: 0 - critical Needs to be addressed ASAP t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sanitize bot output

4 participants