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

Python Interactive Window starts up Jupyter server listening on localhost, open to all #2777

Closed
nimish opened this issue Oct 31, 2019 · 7 comments

Comments

@nimish
Copy link

nimish commented Oct 31, 2019

Bug: Notebook Editor, Interactive Window, Python Editor cells

Steps to cause the bug to occur

  1. Run anything in the python interactive window
  2. Go to http://localhost:8888 (or whatever a jupyter host would do on your machine)
  3. Mess about with a jupyter server listening on localhost

Actual & Expected behavior

Actual: It's not a great idea to spin up a globally-listening server that can execute arbitrary code as a side effect of an IDE

Expected: the jupyter server is accessed using UNIX domain sockets/ whatever NT uses: jupyter/notebook#4835

Your Jupyter and/or Python environment

VS Code latest, mac OS 10.15

@DonJayamanne
Copy link
Contributor

Oops, closed accidentally

@DonJayamanne DonJayamanne reopened this Nov 1, 2019
@rchiodo
Copy link
Contributor

rchiodo commented Nov 6, 2019

This is not an issue because even though it opens that port, it won't accept traffic unless you provide the token. We don't expose the token anywhere, so our app is the only thing that can talk to that port.

Here's what you get if you just type in http://localhost:8888 from a browser after we start it:
image

@rchiodo rchiodo closed this as completed Nov 6, 2019
@nimish
Copy link
Author

nimish commented Nov 6, 2019

I'm able to actually login and use the jupyter notebook that VS Code launches, and I've confirmed I don't have any other jupyter servers up. Potentially related to having cookies for this jupyter server when run in a different context.

It's more concerning that the extension doesn't warn that a globally listening server is launched (eating a port, but that's less important). Further, there is an alternative that has none of these issues: use the unix domain sockets which NT supports too, or embed the ipython shell.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 6, 2019

Yes cookies will make it work on your local box. But if you try from somewhere else it won't be available (or if you clear your cookies).

@rchiodo
Copy link
Contributor

rchiodo commented Nov 6, 2019

Note: Unix Domain Sockets likely requires support from Jupyter Server as they're the one opening the port.

@rchiodo rchiodo reopened this Nov 6, 2019
@rchiodo
Copy link
Contributor

rchiodo commented Nov 6, 2019

Jupyter issue about this already:
jupyter/notebook#2503

@greazer
Copy link
Member

greazer commented Nov 7, 2019

Thanks for the feedback, @nimish. We're going to close because we believe this is a jupyter issue.

@greazer greazer closed this as completed Nov 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 14, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants