Skip to content

Commit 8b8f44b

Browse files
committed
Disallow control characters in name fields
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
1 parent f624381 commit 8b8f44b

File tree

3 files changed

+97
-73
lines changed

3 files changed

+97
-73
lines changed

csi.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ message CreateVolumeRequest {
189189
// an identifier by which to refer to the newly provisioned
190190
// storage. If a storage system supports this, it can optionally
191191
// use this name as the identifier for the new volume.
192+
// Any Unicode string that conforms to the length limit is allowed
193+
// except those containing the following banned characters:
194+
// U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F.
195+
// (These are control characters other than commonly used whitespace.)
192196
string name = 1;
193197

194198
// This field is OPTIONAL. This allows the CO to specify the capacity
@@ -770,6 +774,10 @@ message CreateSnapshotRequest {
770774

771775
// The suggested name for the snapshot. This field is REQUIRED for
772776
// idempotency.
777+
// Any Unicode string that conforms to the length limit is allowed
778+
// except those containing the following banned characters:
779+
// U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F.
780+
// (These are control characters other than commonly used whitespace.)
773781
string name = 2;
774782

775783
// Secrets required by plugin to complete snapshot creation request.

0 commit comments

Comments
 (0)