Bug in import(...) on Windows?
andrey.zherikov at gmail.com
Wed Sep 2 18:40:55 UTC 2020
On Wednesday, 2 September 2020 at 17:47:47 UTC, Adam D. Ruppe
> On Wednesday, 2 September 2020 at 17:39:04 UTC, Andrey Zherikov
>> Is this a bug in dmd?
> I think it is an old bug filed (I can't find it though) about
> inconsistent platform behavior but it is allowed by spec for
> the compiler to reject any path components.
> import("") is supposed to just give a filename, no directory
> See: https://dlang.org/spec/expression.html#import_expressions
> "Implementations may restrict the file name in order to avoid
> directory traversal security vulnerabilities. A possible
> restriction might be to disallow any path components in the
> file name."
If I provide -Jfoo to dmd, doesn't it mean my consent to use the
contents of directory foo?
More information about the Digitalmars-d-learn