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

crypto: add cipher update/final methods encoding validation by vitpavlenko · Pull Request #45990 · nodejs/node · GitHub

/ node Public

crypto: add cipher update/final methods encoding validation - #45990

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
vitpavlenko:bugfix/45189-encoding-validation
Jan 17, 2023
Merged

crypto: add cipher update/final methods encoding validation#45990
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
vitpavlenko:bugfix/45189-encoding-validation

Conversation

vitpavlenko commented Dec 27, 2022
edited by panva
Loading

Copy link
Copy Markdown
Contributor

Adds encoding validation to update and final cipher methods.

Refs: #45189

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. labels Dec 27, 2022
Comment thread README.md Outdated
Comment thread lib/internal/crypto/cipher.js Outdated
Comment thread lib/internal/validators.js Outdated
vitpavlenko force-pushed the bugfix/45189-encoding-validation branch from eba9755 to 9bbecff Compare December 28, 2022 12:16
VoltrexKeyva dismissed their stale review December 28, 2022 14:40

Changes addressed

vitpavlenko force-pushed the bugfix/45189-encoding-validation branch from 9bbecff to 449cc81 Compare December 28, 2022 16:34

vitpavlenko commented Dec 28, 2022
edited
Loading

Copy link
Copy Markdown
Contributor Author

Sorry, some-how missed js lint error in test. Fixed it, also updated first commit message. Please approve run @VoltrexKeyva

Copy link
Copy Markdown
Contributor Author

@VoltrexKeyva any chance to approve?)

panva added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 1, 2023
panva removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 1, 2023
panva requested a review from targos January 1, 2023 16:43
panva changed the title cipher: add cipher update/final methods encoding validation crypto: add cipher update/final methods encoding validation Jan 1, 2023
panva added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jan 1, 2023
vitpavlenko force-pushed the bugfix/45189-encoding-validation branch from 449cc81 to 1853424 Compare January 1, 2023 17:20
panva added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 1, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 1, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

panva previously requested changes Jan 6, 2023

panva left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can do perfectly fine without a new error. Here's a combined diff of my suggested changes.

panva removed the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Jan 12, 2023
panva dismissed their stale review January 12, 2023 17:55

feedback applied

panva force-pushed the bugfix/45189-encoding-validation branch from 47f8bc3 to ca20150 Compare January 12, 2023 20:32
panva 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. and removed doc Issues and PRs related to the documentations. labels Jan 13, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 13, 2023

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

if (normalizedEncoding === undefined) {
throw new ERR_UNKNOWN_ENCODING(encoding);
}
assert(false, 'Cannot change encoding');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why throw error by assert? it will be some internal error, no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can replace the assert with a coded error in a follow up semver-major PRs that contain breaking changes and should be released in the next major version. PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it is better to have a coded error, can I make the change? @panva

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure, best wait until this change lands.

panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 17, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 17, 2023
nodejs-github-bot merged commit 5a7d4a7 into nodejs:main Jan 17, 2023

Copy link
Copy Markdown
Collaborator

Landed in 5a7d4a7

RafaelGSS pushed a commit that referenced this pull request Jan 20, 2023
Refs #45189

PR-URL: #45990
Refs: #45189
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
RafaelGSS mentioned this pull request Jan 20, 2023
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
Refs #45189

PR-URL: #45990
Refs: #45189
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
juanarbol mentioned this pull request Jan 28, 2023
juanarbol pushed a commit that referenced this pull request Jan 31, 2023
Refs #45189

PR-URL: #45990
Refs: #45189
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. crypto Issues and PRs related to the crypto subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. review wanted PRs that need reviews.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL