[Issue 21227] import(".\\file") doesn't work on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 6 16:50:28 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21227

--- Comment #3 from Andrey Zherikov <andrey.zherikov at gmail.com> ---
I'm not an expert in this subject but IMO the restrictions should simple:
 - Do not allow absolute path. There is FileName.absolute function that can be
used: https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d#L103
 - Do not allow reference to parent (i.e. ".." ) directory anywhere in the path

--


More information about the Digitalmars-d-bugs mailing list