Skip to content
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

refactor: check permissions in SourceFileFetcher #5011

Merged
merged 9 commits into from
May 11, 2020

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Apr 30, 2020

This PR hot-fixes permission escapes in dynamic imports, workers
and runtime compiler APIs.

permissions parameter was added to public APIs of SourceFileFetcher
and appropriate permission checks are performed during loading of
local and remote files.

Fixes #4781
Fixes #4744

@bartlomieju bartlomieju force-pushed the file_fetcher_permissions branch from 79d9454 to ad9ad41 Compare May 10, 2020 12:01
@bartlomieju bartlomieju changed the title [WIP] add permissions argument to file fetcher methods refactor: check permissions in SourceFileFetcher May 10, 2020
cli/state.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member Author

bartlomieju commented May 10, 2020

Blocked by #5208

@bartlomieju bartlomieju force-pushed the file_fetcher_permissions branch from ba88105 to dd00b6a Compare May 10, 2020 13:24
@bartlomieju
Copy link
Member Author

bartlomieju commented May 10, 2020

Note to self: update workers and runtime compiler API docs with note that read/net permission are now required

@bartlomieju bartlomieju requested a review from ry May 10, 2020 16:10
@bartlomieju bartlomieju force-pushed the file_fetcher_permissions branch from 7fc6e29 to f576f8d Compare May 10, 2020 21:40
cli/ops/runtime_compiler.rs Outdated Show resolved Hide resolved
docs/runtime/workers.md Outdated Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit 32aeec9 into denoland:master May 11, 2020
@bartlomieju bartlomieju deleted the file_fetcher_permissions branch May 11, 2020 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SourceFileFetcher should be aware of permissions Loading worker modules should check permissions
2 participants