-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
When parsing URIs we use splitList which is defined locally:
csi-driver/pkg/requestgen/generator.go
Line 164 in c94e146
| for _, uriS := range splitList(csv) { |
csi-driver/pkg/requestgen/generator.go
Lines 223 to 230 in c94e146
| // splitList returns the given csv as a slice. Trims space of each element. | |
| func splitList(csv string) []string { | |
| var list []string | |
| for _, s := range strings.Split(csv, ",") { | |
| list = append(list, strings.TrimSpace(s)) | |
| } | |
| return list | |
| } |
This split function has no support for escaping commas and as such could be invalid for certain URIs which can legally contain commas. Ideally we should use CSV parsing logic instead, which would allow URIs containing commas to be used.
For related discussion in a review of a cert-manager feature, see: cert-manager/cert-manager#4502 (comment)
Metadata
Metadata
Assignees
Labels
No labels