asvd / jailed

execute untrusted code with custom permissions
MIT License
1.01k stars 69 forks source link

fixed Node-detection #25

Closed florianb closed 8 years ago

florianb commented 8 years ago

The previous implementation was depending on the window-property which is at least in the Electron-environment available although the javascript is running in a Node-process.

The new detection-statement relies on the process.release-object which allows the safe identification of node.js and io.js.

P.s.: I didn't open an issue since it seems to be an atomic change. I hope filing immediately a PR is not considered as rude behaviour.

:beers:

asvd commented 8 years ago

Good point, thanks! I did not investigate much on proper detection before, and just picked the first solution that worked.

(I'm working on the project by myself, so there's not that much rules :smile:)

florianb commented 8 years ago

No worries - i'm happy you created and offer jailed! :smiley:

(And if i get a clue to improve something you'll receive another PR.. :wink:)

asvd commented 8 years ago

sure, you are welcome! :+1: (but I don't accept everything just like that :wink:)