denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94k stars 5.23k forks source link

`deno_core::resolve_import` is CWD dependant #15436

Closed lucacasonato closed 1 year ago

lucacasonato commented 2 years ago

deno_core::resolve_import("", "<unknown>") causes an std::fs::cwd call to be made. This is highly unexpected and possibly a hazard, considering that deno_core is otherwise completely oblivious to the underlying module loading system. As far as I am aware this cwd can not leak into the isolate, so the hazard is restricted to only Rust embedders. Regardless, resolve_import should not treat <unknown> as a special base URL that results in a std::fs::cwd call.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

bartlomieju commented 1 year ago

Already done, see the linked PR above.