On 11.08.2016 19:43, Cole Robinson wrote: > On 08/11/2016 12:02 PM, Michal Privoznik wrote: >> Since ages filesystems allowed to have space characters in >> filenames and even directory names. In fact, on all major >> filesystems out there you can have whatever character you like >> except NULL. There's no reason why we should forbid users to not >> have spaces in their filenames. Moreover, if we do that only on >> RNG schema level while our XML parser/formatter crunches that >> happily. >> > > There's a fedora bug about this particular issue: > > https://bugzilla.redhat.com/show_bug.cgi?id=1353296 Ah, thank you for pointing that out. I often forget about those. > > But for example this range still rejects other valid characters as well, like > unicode á . So maybe rather than a whitelist, we go the opposite way and make > this a minimal blacklist, or drop the validation entirely. Unless there's some > designated way to handle regex validation for unicode... Yeah, I guess we can drop the validation completely. I see couple of reasons to do that: a) all modern filesystems allow users to have whatever character they want in the file name (except NULL) [1] b) we must not think about disk sources as UNIX style paths. I mean, there are some hypervisors (like ESX) where disk source is just a name that is translated by hypervisor then into a path that it understands. c) it's okay if we have wider schema but narrower parser. I mean, if schema allows something that is later reject by parser. Will post v2. Thank you. Michal 1: https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list