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

[Question] Is the JS interpreter sandboxed? #13168

Closed
hrj opened this issue May 20, 2017 · 3 comments
Closed

[Question] Is the JS interpreter sandboxed? #13168

hrj opened this issue May 20, 2017 · 3 comments

Comments

@hrj
Copy link

@hrj hrj commented May 20, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.05.18.1
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

When the JS from a website is interpreted by youtube-dl, is the JS sufficiently sandboxed so that:

  • No local filesystem access is allowed
  • No system calls and/or native library calls are allowed
  • No python APIs are allowed

?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 20, 2017

JS interpreter only supports a language subset needed for interpreting YouTube JS. Nothing from aforementioned list is supported.

@dstftw dstftw closed this May 20, 2017
@hrj
Copy link
Author

@hrj hrj commented May 20, 2017

@dstftw Thanks for replying. The things I listed are not exactly language features. They are about the API surface exposed to the JS. I tried skimming through jsinterp.py with the limited understanding of python that I have, but couldn't be sure what the API surface is. It looks like there is no DOM API exposed, am I right? What about native python objects? For example, the code is using an array of objects and functions to store corresponding JS values. Is it possible to access python code through lookups on these values through JS?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 20, 2017

I've already answered: nothing you listed is possible.

@ytdl-org ytdl-org locked and limited conversation to collaborators May 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.