GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — crypto, string_bytes: treat `buffer` str as `utf8` by indutny · Pull Request #5522 · nodejs/node Conversation
Member
Pull Request check-listPlease make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done Affected core subsystem(s)Please provide affected core subsystem(s) (like buffer, cluster, crypto, etc) Description of changeDo not treat crypto inputs as
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsDo not treat crypto inputs as `binary` strings, convert them to Buffers using `new Buffer(..., 'utf8')`, or using newly updated StringBytes APIs.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
4 tasks done
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
indutny
added a commit
that referenced
this pull request
Do not treat crypto inputs as `binary` strings, convert them to Buffers using `new Buffer(..., 'utf8')`, or using newly updated StringBytes APIs. PR-URL: #5522 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence doesn't make much sense anymore since legacy programs were not assuming
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gosh, this is true.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I ask you to submit follow-up PR to fix this?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Closed
fanatid
added a commit
to browserify/hash-base
that referenced
this pull request
omsmith
added a commit
to omsmith/pouchdb
that referenced
this pull request
The default encoding was switched to utf8 in nodejs/node#5522
omsmith
added a commit
to omsmith/pouchdb
that referenced
this pull request
The default encoding was switched to utf8 in nodejs/node#5522
daleharvey
pushed a commit
to apache/pouchdb
that referenced
this pull request
The default encoding was switched to utf8 in nodejs/node#5522
|
There was an error while loading. Please reload this page.
|
Just saw websockets/ws#716. Did someone write a blog post / example in docs on what Node users need to change (for example, with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR made sweeping backwards-incompatible changes to the crypto API, but did not include documentation. cf. #10265 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sam-github clearly this PR changes all occurrences of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So, that basically boils down to "existing behaviour was undocumented, so there were no docs to change", which is one way to look at it. I'm not necessarily saying that this PR shouldn't have landed without you being forced to document the crypto APIs, but I am saying that users of APIs like Which is why I commented here, so that future readers of this PR can know that the changes it made weren't documented. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I agree we could do better on this. However, careful reader of docs would notice: https://github.com/nodejs/node/pull/5522/files#diff-efc9444c79e30e68a167275387a55aa6R813 Which says that default encoding is |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So I can't say that it was completely undocumented, just wasn't in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PullRequest nodejs#5522 and nodejs#5500 described the change of the default encoding into UTF8 in crypto functions. This however was only changed for the non-streaming API. The streaming API still used binary as the default encoding. This commit will change the default streaming API encoding to UTF8 to make both APIs behave the same. It will also add tests to validate the behavior.
PullRequest #5522 and #5500 described the change of the default encoding into UTF8 in crypto functions. This however was only changed for the non-streaming API. The streaming API still used binary as the default encoding. This commit will change the default streaming API encoding to UTF8 to make both APIs behave the same. It will also add tests to validate the behavior. Refs: #5522 Refs: #5500 PR-URL: #8611 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PullRequest nodejs#5522 and nodejs#5500 described the change of the default encoding into UTF8 in crypto functions. This however was only changed for the non-streaming API. The streaming API still used binary as the default encoding. This commit will change the default streaming API encoding to UTF8 to make both APIs behave the same. It will also add tests to validate the behavior. Refs: nodejs#5522 Refs: nodejs#5500 PR-URL: nodejs#8611 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.