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

Validate the SET, MSET, SETRANGE and similar refuse to create empty keys #199

Closed
danielealbano opened this issue Aug 28, 2022 · 0 comments · Fixed by #201
Closed

Validate the SET, MSET, SETRANGE and similar refuse to create empty keys #199

danielealbano opened this issue Aug 28, 2022 · 0 comments · Fixed by #201
Assignees
Labels
bug Something isn't working
Milestone

Comments

@danielealbano
Copy link
Owner

From some initial testing, looks like SET accept empty keys, which shouldn't be allowed.

The various function that SET values must be reviewed to ensure that this is prevented.

Also, it's necessary to analyze Redis behaviour to match the error messages and/or the operations carried out.

@danielealbano danielealbano self-assigned this Aug 28, 2022
@danielealbano danielealbano added the bug Something isn't working label Aug 28, 2022
@danielealbano danielealbano added this to the v0.2 milestone Aug 28, 2022
danielealbano added a commit that referenced this issue Aug 29, 2022
…eys (#201)

This PR introduces some constraints on the minimum length of keys,
patterns and short strings handled by the Redis command parser to ensure
that if an argument of that type is zero-length will be rejected.

Tests are introduced as well to validate the rejection.

On a side, the PR also changes some code to take into account the
returned value of module_redis_connection_error_message_printf_*

Closes #199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant