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

client library metadata should validate contents #2653

Closed
mgravell opened this issue Feb 23, 2024 · 0 comments · Fixed by #2654
Closed

client library metadata should validate contents #2653

mgravell opened this issue Feb 23, 2024 · 0 comments · Fixed by #2654
Assignees
Labels

Comments

@mgravell
Copy link
Collaborator

The client setinfo lib-name and client setinfo lib-ver sub-commands are picky:

127.0.0.1:6379> client setinfo lib-name "a b"
(error) ERR lib-name cannot contain spaces, newlines or special characters.
127.0.0.1:6379> client setinfo lib-name "a-b"
OK

and

127.0.0.1:6379> client setinfo lib-ver "a b"
(error) ERR lib-ver cannot contain spaces, newlines or special characters.
127.0.0.1:6379> client setinfo lib-ver "a-b"
OK

This causes the library metadata to not be set at all; suggestion: fix this at the library level. We already perform client setname validation, removing invalid characters; however, I propose to replace any groups of invalid characters with a single - instead, to retain semantic grouping. I do not currently propose to change how client setname sanitizes anything, although that could also be considered.

@mgravell mgravell self-assigned this Feb 23, 2024
mgravell added a commit that referenced this issue Feb 23, 2024
mgravell added a commit that referenced this issue Feb 24, 2024
* fix #2653

* Update src/StackExchange.Redis/ServerEndPoint.cs

Co-authored-by: Philo <[email protected]>

* release notes

* merge fail

---------

Co-authored-by: Philo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant