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

Handling of colon in Azure KeyValueStores #119

Open
timostrunk opened this issue Mar 5, 2024 · 6 comments
Open

Handling of colon in Azure KeyValueStores #119

timostrunk opened this issue Mar 5, 2024 · 6 comments

Comments

@timostrunk
Copy link

Hi everyone,
currently minimalkv prohibits using colon ":" in KeyValueStores due to it not being in VALID_KEY_RE_EXTENDED.
Azure Stores would support colons in their path. As far as I know this is currently impossible to read using minimalkv. I.e. if another application writes a file with a colon, you cannot read this file with minimalkv (no expert here though, maybe there is a way to quote this).

I can create a PR to allow for colons only for Azure stores. Would this be ok or is there a decision not to allow this to keep the allowed filenames uniform between different store classes?

@timostrunk
Copy link
Author

I made a draft PR here #120

timostrunk pushed a commit to timostrunk/minimalkv that referenced this issue Mar 5, 2024
@xhochy
Copy link
Member

xhochy commented Mar 10, 2024

I would prefer to only allow filename in minimalkv that are supported by a wider range of stores. We can add colons but only if the e.g. also work in the other major cloud object stores.

@timostrunk
Copy link
Author

Understood, I will analyze how the other stores are handling colons and post my results in this issue. Please keep the issue open for this, I will close the PR.

@xhochy
Copy link
Member

xhochy commented Mar 13, 2024

Do you only want to read these keys or also write them?

@timostrunk
Copy link
Author

We only need to read these keys. At the moment simply adding the colon to the allowed symbols regexp looks promising. Nothing breaks. The only filesystem I know not accepting colon in the filename would be ntfs.

@xhochy
Copy link
Member

xhochy commented Mar 24, 2024

I would only be 80% on board adding the colon to allowed characters, but what about turning the key validity check on read from an error into a warning?

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