http: setEncoding error for incoming packets by iSkore · Pull Request #18178 · nodejs/node

@nodejs-github-bot added the http

Issues or PRs related to the http subsystem.

label

Jan 16, 2018
added override to socket.setEncoding to not allow encoding changes for
incoming HTTP requests
added tests to ensure method throws JavaScript error
because an HTTP buffer must be in US-ASCII, this function should not
be allowed and should throw an Error
currently, the process encounters a fatal v8 error and crashes

error report detailed in
[issue #18118](#18118)

Fixes: #18118
Ref: #18178
added override to socket.setEncoding to not allow encoding changes for
incoming HTTP requests
added tests to ensure method throws JavaScript error
because an HTTP buffer must be in US-ASCII, this function should not
be allowed and should throw an Error
currently, the process encounters a fatal v8 error and crashes

error report detailed in
[issue #18118](#18118)

Fixes: #18118
Ref: #18178

iSkore

BridgeAR

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018
added override to socket.setEncoding to not allow encoding changes for
incoming HTTP requests
added tests to ensure method throws JavaScript error
because an HTTP buffer must be in US-ASCII, this function should not
be allowed and should throw an Error
currently, the process encounters a fatal v8 error and crashes

error report detailed in
[issue nodejs#18118](nodejs#18118)

Fixes: nodejs#18118
Ref: nodejs#18178

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018
added ERR_HTTP_INCOMING_SOCKET_ENCODING error and error docs
throw ERR_HTTP_INCOMING_SOCKET_ENCODING error when incoming request
socket encoding is manipulated

error report detailed in nodejs#18118

Fixes: nodejs#18118
Ref: nodejs#18178

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018

iSkore added a commit to iSkore/node that referenced this pull request

Apr 3, 2018

iSkore added a commit to iSkore/node that referenced this pull request

May 14, 2020
applied updates from previous pull-requests to disallow
socket.setEncoding before a http connection is parsed.
wrapped socket.setEncoding to throw an error.
previously resulted in a fatal error

Fixes: nodejs#18118
Ref: nodejs#18178
Ref: nodejs#19344

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request

May 23, 2020
Applied updates from previous pull-requests to disallow
socket.setEncoding before a http connection is parsed.
Wrapped `socket.setEncoding` to throw an error.
This previously resulted in a fatal error.

PR-URL: nodejs#33405
Fixes: nodejs#18118
Refs: nodejs#18178
Refs: nodejs#19344
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>