Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: command line multi-byte prefix panic #1182

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

ThomasFrans
Copy link
Contributor

Don't index into the command line command as the prefix can be altered by the user and therefore be a multi-byte unicode character.

@ThomasFrans
Copy link
Contributor Author

I was aware of this bug already but didn't submit a patch as I didn't think users could edit the command. I forgot that users can move 'in front of the prefix', which can cause a crash when they submit a command that contains a multi-byte character as the prefix, like '🔥' for example.

Don't index into the command line command as the prefix can be altered
by the user and therefore be a multi-byte unicode character.
@ThomasFrans ThomasFrans force-pushed the fix-command-line-unicode-panic branch from 347ca84 to 3e91294 Compare June 3, 2023 17:53
@hrkfdn hrkfdn merged commit bbd7bcf into hrkfdn:main Jun 4, 2023
@hrkfdn
Copy link
Owner

hrkfdn commented Jun 4, 2023

Nice catch, thanks!

@ThomasFrans ThomasFrans deleted the fix-command-line-unicode-panic branch June 4, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants