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

Ignore redis key if not UTF8 #1997

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Ignore redis key if not UTF8 #1997

merged 1 commit into from
Feb 6, 2023

Conversation

sl0thentr0py
Copy link
Member

fixes #1992

@sl0thentr0py sl0thentr0py enabled auto-merge (squash) February 6, 2023 13:42
@@ -54,7 +54,8 @@ def commands_description
def parsed_commands
commands.map do |statement|
command, key, *arguments = statement
command_set = { command: command.to_s.upcase, key: key }
command_set = { command: command.to_s.upcase }
command_set[:key] = key if Utils::EncodingHelper.valid_utf_8?(key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since key is kinda important in commands, do you think it'd be better insert a placeholder like "<invalid encoded key>" instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the type of redis command signifies that there's a key there, I think that's fine.
This is edge-case behaviour anyway.

@st0012 st0012 added this to the 5.8.0 milestone Feb 6, 2023
@sl0thentr0py sl0thentr0py merged commit e8d4798 into master Feb 6, 2023
@sl0thentr0py sl0thentr0py deleted the neel/fix-redis-key branch February 6, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transaction sending failed: "\xD9" from ASCII-8BIT to UTF-8
2 participants