Skip to content

String encode rules #267

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

Closed
bswartz opened this issue Aug 30, 2018 · 4 comments
Closed

String encode rules #267

bswartz opened this issue Aug 30, 2018 · 4 comments
Milestone

Comments

@bswartz
Copy link
Contributor

bswartz commented Aug 30, 2018

The current spec doesn't say anything about whether Unicode characters are allowed in various string fields (most notably the volume name), and if so, whether UTF-8 encoding is required or whether other encodings are allowed.

Also, it's not clear whether whitespace, newlines, tabs, or control characters including backspaces, NULs, EOFs, BELLs, etc should be allowed in string fields.

Some fields clearly specify alphanumeric values, and we could probably expand this language to other fields, or put some general language about all strings in the document.

@jdef
Copy link
Member

jdef commented Aug 30, 2018 via email

@bswartz
Copy link
Contributor Author

bswartz commented Aug 30, 2018

You're right about UTF-8 encoding. And I'm fine with the idea of allowing Unicode characters in CreateVolumeRequest.name, but then there should be test cases to make sure that plugin authors don't make bad assumptions about the incoming names.

I'm less okay with allowing weird control characters in the suggested name, because there's no valid reason for it. Nobody is going to name their CSI volume "\x07".

@saad-ali
Copy link
Member

saad-ali commented Nov 6, 2018

Conclusion on CSI call was to add limits for "obviously" not useful characters e.g. NUL, BEL, etc. but not block whitespace, etc. Driver is always responsible for validating input.

@saad-ali
Copy link
Member

saad-ali commented Nov 6, 2018

@bswartz are you working on this? We'd like to get all 1.0 changes merged by EOD Friday Nov 9.

bswartz added a commit to bswartz/spec that referenced this issue Nov 7, 2018
Earlier versions of the spec put no limits on name fields, but
indicate that names should be usable as identifiers on storage
backends. Control characers obviously conflict with this purpose,
so specify that they're prohibitted, while making it clear that
all other valid Unicode strings are allowed.

Fixes container-storage-interface#267
bswartz added a commit to bswartz/spec that referenced this issue Nov 8, 2018
Earlier versions of the spec put no limits on name fields, but
indicate that names should be usable as identifiers on storage
backends. Control characers obviously conflict with this purpose,
so specify that they're prohibitted, while making it clear that
all other valid Unicode strings are allowed.

Fixes container-storage-interface#267
@jieyu jieyu closed this as completed in #303 Nov 8, 2018
jieyu pushed a commit that referenced this issue Nov 8, 2018
Earlier versions of the spec put no limits on name fields, but
indicate that names should be usable as identifiers on storage
backends. Control characers obviously conflict with this purpose,
so specify that they're prohibitted, while making it clear that
all other valid Unicode strings are allowed.

Fixes #267
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants