Skip to content

Code block: remove null bytes before parsing AST#1467

Merged
kosayoda merged 2 commits into
mainfrom
bug/info/bot-xr/code-block-null-byte
Mar 17, 2021
Merged

Code block: remove null bytes before parsing AST#1467
kosayoda merged 2 commits into
mainfrom
bug/info/bot-xr/code-block-null-byte

Conversation

@MarkKoz
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz commented Mar 15, 2021

ast.parse raises a ValueError complaining that source code strings cannot contain null bytes. It seems like they may accidentally get pasted into Discord by users sometimes. I couldn't manage to paste a null byte myself.

Fixes BOT-XR

`ast.parse` raises a ValueError complaining that source code strings
cannot contain null bytes. It seems like they may accidentally get
pasted into Discord by users sometimes.
@MarkKoz MarkKoz added t: bug Something isn't working p: 3 - low Low Priority a: information Related to information commands: (doc, help, information, reddit, site, tags) labels Mar 15, 2021
Copy link
Copy Markdown
Contributor

@Akarys42 Akarys42 left a comment

Choose a reason for hiding this comment

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

Good stuff, cheers!

Copy link
Copy Markdown
Contributor

@kosayoda kosayoda left a comment

Choose a reason for hiding this comment

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

solid

@kosayoda kosayoda enabled auto-merge March 17, 2021 09:44
@kosayoda kosayoda merged commit b76d0e5 into main Mar 17, 2021
@kosayoda kosayoda deleted the bug/info/bot-xr/code-block-null-byte branch March 17, 2021 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 3 - low Low Priority t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants