-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not whitelist remapping targets #12014
Comments
I like to try this issue, if it's not urgent |
I think we also need a new test case; I don't know you add tests for this kind of issues or not. a downside comes to my mind is that adding tests for such small issues could make running our tests so time consuming after couple of years. |
It's not urgent but this is not the best moment to start working on this because #11688 and #12007 have not been merged yet and they change a lot regarding It's also a breaking change so it should be based on |
please move this issue to |
Sure. Move to "review in progress" now. It will get moved to "done" automatically when the issue is closed. Merging needs to wait for #12150 unfortunately. |
Originally requested in #11688 (comment).
Abstract
Normally, importing files from arbitrary directories requires whitelisting those directories using
--allow-paths
. That's not the case when the import contains a remapping. This automatic whitelisting should be removed.Example
This causes an error:
While this does not:
This is especially weird when the remapping does not really do anything:
Specification
Remapping prefixes, targets and contexts should not be added to allowed paths.
Backwards Compatibility
The change is not backwards-compatible. Users relying on this behavior will have to start adding
--allowed-paths
to their commands.The text was updated successfully, but these errors were encountered: