Skip to content

Conversation

kaue
Copy link
Contributor

@kaue kaue commented Dec 15, 2018

No description provided.

kaue added 12 commits November 15, 2018 18:28
should not have access to Node.js objects
lint
0.4.2
should not have access to Node.js objects using Object.getPrototypeOf (CWE-265)
should not have access to Node.js objects using Object.getPrototypeOf with context (CWE-265)
should check prototype also
lint
lint
stop using template string for clearContext function
@ChrisCinelli
Copy link

Why is this not merged and released? I reported to the npm team.

@hacksparrow
Copy link
Owner

@ChrisCinelli Function = undefined. We can't overwrite a global object.

@ChrisCinelli
Copy link

@kauegimenes :
You could also add this test to verify that #12 is fixed:

  it("should not modify Object's constructor", function () {
    var evaluatedBefore = Object.getOwnPropertyDescriptor(Object, 'constructor')
    console.log(evaluatedBefore)
    assert(evaluatedBefore === undefined)
    safeEval('42')
    var evaluatedAfter = Object.getOwnPropertyDescriptor(Object, 'constructor')
    console.log(evaluatedBefore)
    assert(evaluatedAfter === undefined)
  })

@ChrisCinelli ChrisCinelli mentioned this pull request Dec 29, 2018
@ChrisCinelli
Copy link

Just added comments on #16. This only fixes one tiny vulnerability.

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.

3 participants