On Mon, Aug 22, 2016, at 10:21, Ben Finney wrote: > So yes, filenames from arbitrary sources should be *completely* > untrusted, and never used to access any file on the system. Throw the > entire filename away and make a filename locally, without using any part > of the original name.
To be fair, this particular case is unique in presenting a possibility to cause problems even for a filename that consists only of whitelisted characters (for a reasonable-sounding whitelist such as "ASCII letters and numbers and underscore only; all other characters to be scrubbed and replaced with {underscore, hex escape, nothing}"). I don't think there's any other precedent. -- https://mail.python.org/mailman/listinfo/python-list