FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

assert: make `assert.fail` less affected by prototype tampering by aduh95 · Pull Request #42918 · nodejs/node · GitHub

/ node Public

assert: make assert.fail less affected by prototype tampering - #42918

Merged
nodejs-github-bot merged 2 commits into
nodejs:masterfrom
aduh95:assert-fail-prototype-tampering
May 2, 2022
Merged

assert: make assert.fail less affected by prototype tampering#42918
nodejs-github-bot merged 2 commits into
nodejs:masterfrom
aduh95:assert-fail-prototype-tampering

Conversation

aduh95 commented Apr 29, 2022

Copy link
Copy Markdown
Contributor

Before this change:

node:internal/assert/assertion_error:443
    ObjectDefineProperty(this, 'name', {
    ^

TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
    at defineProperty (<anonymous>)
    at new AssertionError (node:internal/assert/assertion_error:443:5)
    at compareExceptionKey (node:assert:626:19)
    at expectedException (node:assert:693:9)
    at expectsError (node:assert:847:3)
    at Function.throws (node:assert:902:3)
    at Object.<anonymous> (…/test/parallel/test-assert-fail.js:43:8)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)

Node.js v19.0.0-pre

With this change:

node:assert:170
  throw err;
  ^

AssertionError [ERR_ASSERTION]
    at [eval]:1:8
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:76:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:75:60)
    at node:internal/main/eval_string:27:3 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: undefined,
  operator: 'fail'
}

Node.js v19.0.0-pre

nodejs-github-bot added assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run. labels Apr 29, 2022
aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 30, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 30, 2022

Copy link
Copy Markdown
Collaborator

aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label May 2, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 2, 2022
nodejs-github-bot merged commit 2b41f59 into nodejs:master May 2, 2022

Copy link
Copy Markdown
Collaborator

Landed in 2b41f59

aduh95 deleted the assert-fail-prototype-tampering branch May 2, 2022 17:47
RafaelGSS pushed a commit that referenced this pull request May 10, 2022
PR-URL: #42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
RafaelGSS mentioned this pull request May 10, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#42918
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL