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

Fix permission check for net #2373

Merged
merged 6 commits into from
May 17, 2019
Merged

Fix permission check for net #2373

merged 6 commits into from
May 17, 2019

Conversation

bartlomieju
Copy link
Member

Closes #2371

It turns out we were checking for "listen", "dial" and "accept" addresses in net permissions 😅

I removed check in op_accept because we need to first issue op_listen and there is already check there.

@ry
Copy link
Member

ry commented May 17, 2019

Thanks! Is it possible to add a test to tools/complex_permissions_test.py that demos this fix? (Presumably, for example, listen wasn't properly obeying --allow-net arguments before.)

@bartlomieju
Copy link
Member Author

Sorry @ry, should have started with tests in the first place, turns out my initial solution was wrong 😉 I guess it's worth mentioning in the docs that --allow-net=addr1,addr2 allows to access addr1 and addr2 before they are 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 - thanks for this fix!

@ry ry merged commit 7219787 into denoland:master May 17, 2019
@bartlomieju bartlomieju deleted the fix-net_perms branch May 17, 2019 18:52
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 23, 2019
bartlomieju added a commit to bartlomieju/deno that referenced this pull request May 23, 2019
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.

[Question] Is the incompatibility of allow-net between flags and options intentionally?
2 participants