-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
tools: report unsafe string and regex primordials as lint errors #43393
Merged
Conversation
This file contains 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
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test`
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
repl
Issues and PRs related to the REPL subsystem.
tls
Issues and PRs related to the tls subsystem.
tools
Issues and PRs related to the tools directory.
labels
Jun 12, 2022
tniessen
approved these changes
Jun 12, 2022
LGTM since this only seems to affect the primordial versions of these functions. |
jasnell
approved these changes
Jun 13, 2022
tniessen
added
request-ci
Add this label to start a Jenkins CI on a PR.
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
labels
Jun 13, 2022
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Jun 13, 2022
17 tasks
aduh95
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Jun 15, 2022
nodejs-github-bot
added
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
and removed
commit-queue
Add this label to land a pull request using GitHub Actions.
labels
Jun 15, 2022
Commit Queue failed- Loading data for nodejs/node/pull/43393 ✔ Done loading data for nodejs/node/pull/43393 ----------------------------------- PR info ------------------------------------ Title tools: report unsafe string and regex primordials as lint errors (#43393) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch aduh95:lint-unsafe-primordials -> nodejs:main Labels tls, repl, tools, author ready, needs-ci Commits 1 - tools: report unsafe string and regex primordials as lint errors Committers 1 - Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/43393 Reviewed-By: Tobias Nießen Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/43393 Reviewed-By: Tobias Nießen Reviewed-By: James M Snell -------------------------------------------------------------------------------- ℹ This PR was created on Sun, 12 Jun 2022 13:45:56 GMT ✔ Approvals: 2 ✔ - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/43393#pullrequestreview-1003647323 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43393#pullrequestreview-1004615237 ✖ Last GitHub CI failed ℹ Last Full PR CI on 2022-06-15T20:44:05Z: https://ci.nodejs.org/job/node-test-pull-request/44598/ - Querying data for job/node-test-pull-request/44598/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2505419325 |
Landed in 9119382 |
22 tasks
danielleadams
pushed a commit
that referenced
this pull request
Jun 16, 2022
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test` `RegExp.prototype[Symbol.replace]` and `RegExp.prototype[Symbol.split]` are still allowed for a lack of a better solution. PR-URL: #43393 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
31 tasks
34 tasks
3 tasks
aduh95
added a commit
to aduh95/node
that referenced
this pull request
Aug 1, 2022
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test` `RegExp.prototype[Symbol.replace]` and `RegExp.prototype[Symbol.split]` are still allowed for a lack of a better solution. PR-URL: nodejs#43393 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95
added a commit
to aduh95/node
that referenced
this pull request
Aug 1, 2022
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test` `RegExp.prototype[Symbol.replace]` and `RegExp.prototype[Symbol.split]` are still allowed for a lack of a better solution. PR-URL: nodejs#43393 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Aug 2, 2022
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test` `RegExp.prototype[Symbol.replace]` and `RegExp.prototype[Symbol.split]` are still allowed for a lack of a better solution. PR-URL: #43393 Backport-PR-URL: #44081 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
| The string method | looks up the property | | ----------------------------- | --------------------- | | `String.prototype.match` | `Symbol.match` | | `String.prototype.matchAll` | `Symbol.matchAll` | | `String.prototype.replace` | `Symbol.replace` | | `String.prototype.replaceAll` | `Symbol.replace` | | `String.prototype.search` | `Symbol.search` | | `String.prototype.split` | `Symbol.split` | Functions that lookup the `exec` property on the prototype chain: * `RegExp.prototype[Symbol.match]` * `RegExp.prototype[Symbol.matchAll]` * `RegExp.prototype[Symbol.replace]` * `RegExp.prototype[Symbol.search]` * `RegExp.prototype[Symbol.split]` * `RegExp.prototype.test` `RegExp.prototype[Symbol.replace]` and `RegExp.prototype[Symbol.split]` are still allowed for a lack of a better solution. PR-URL: nodejs/node#43393 Backport-PR-URL: nodejs/node#44081 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
needs-ci
PRs that need a full CI run.
repl
Issues and PRs related to the REPL subsystem.
tls
Issues and PRs related to the tls subsystem.
tools
Issues and PRs related to the tools directory.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
String.prototype.match
Symbol.match
String.prototype.matchAll
Symbol.matchAll
String.prototype.replace
Symbol.replace
String.prototype.replaceAll
Symbol.replace
String.prototype.search
Symbol.search
String.prototype.split
Symbol.split
Functions that lookup the
exec
property on the prototype chain:RegExp.prototype[Symbol.match]
RegExp.prototype[Symbol.matchAll]
RegExp.prototype[Symbol.replace]
RegExp.prototype[Symbol.search]
RegExp.prototype[Symbol.split]
RegExp.prototype.test
I'm leaving out
RegExp.prototype[Symbol.replace]
andRegExp.prototype[Symbol.split]
until we have a better solution for them.