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

Ensure namespace and collection names are validated #149

Closed
ivansenic opened this issue Feb 16, 2023 · 4 comments · Fixed by #360
Closed

Ensure namespace and collection names are validated #149

ivansenic opened this issue Feb 16, 2023 · 4 comments · Fixed by #360
Assignees

Comments

@ivansenic
Copy link
Contributor

ivansenic commented Feb 16, 2023

Only allow names that C* would allow. Add validation to the commands. Improve URI path patterns to include the validation as well, or maybe simply validate CommandContext that's being passed to the CommandProcessor.

@sync-by-unito
Copy link

sync-by-unito bot commented Apr 12, 2023

➤ Mahesh Rajamani commented:

Ivan Senic I know you have done the validation for namespace and collection name, do we need to check for C* reserved word?

@ivansenic
Copy link
Contributor Author

@maheshrajamani what reserved words are you referring to, I was checking this:

Keyspace names can have up to 48 alpha-numeric characters and contain underscores; only letters and numbers are supported as the first character. Cassandra forces keyspace names to lowercase when entered without quotes. 

@maheshrajamani
Copy link
Contributor

The issue states "Only allow names that C* would allow. ". I was checking if more validation is needed with cassandra reserved words.
Eg: create table select (col1 text PRIMARY KEY , col2 text); SyntaxException: line 1:13 no viable alternative at input 'select' (create table [select]...)

But with the change done to enclose collection names with quotes this should be handled.
Eg: create table "select" (col1 text PRIMARY KEY , col2 text);

Think we can close this issue.

@ivansenic
Copy link
Contributor Author

I still need to enforce validation on the path parameters. Will do this and resolve it.

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 a pull request may close this issue.

2 participants