Skip to content

Commit 86aa4ce

Browse files
bswartzjieyu
authored andcommitted
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 14a3392 commit 86aa4ce

File tree

3 files changed

+98
-74
lines changed

3 files changed

+98
-74
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
@@ -791,6 +795,10 @@ message CreateSnapshotRequest {
791795

792796
// The suggested name for the snapshot. This field is REQUIRED for
793797
// idempotency.
798+
// Any Unicode string that conforms to the length limit is allowed
799+
// except those containing the following banned characters:
800+
// U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F.
801+
// (These are control characters other than commonly used whitespace.)
794802
string name = 2;
795803

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

0 commit comments

Comments
 (0)