summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-11-28url: avoid hostname spoofing w/ javascript protocolMatteo Collina
CVE-2018-12123 Fixes: https://github.com/nodejs-private/security/issues/205 PR-URL: https://github.com/nodejs-private/node-private/pull/145 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-28http,https: protect against slow headers attackMatteo Collina
CVE-2018-12122 An attacker can send a char/s within headers and exahust the resources (file descriptors) of a system even with a tight max header length protection. This PR destroys a socket if it has not received the headers in 40s. PR-URL: https://github.com/nodejs-private/node-private/pull/144 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-28http: fix header limit errors and test for llhttpFedor Indutny
Ref: https://github.com/nodejs-private/node-private/pull/143 PR-URL: https://github.com/nodejs-private/node-private/pull/149 Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-28deps,http: http_parser set max header size to 8KBMatteo Collina
CVE-2018-12121 PR-URL: https://github.com/nodejs-private/node-private/pull/143 Ref: https://github.com/nodejs-private/security/issues/139 Ref: https://github.com/nodejs-private/http-parser-private/pull/2 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-27test: replace anonymous closure functions with arrow functionstpanthera
PR-URL: https://github.com/nodejs/node/pull/24443 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-26test: fix arguments order in `assert.strictEqual`tottokotkd
PR-URL: https://github.com/nodejs/node/pull/24612 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-25test: convert callback to arrow functionjamesgeorge007
PR-URL: https://github.com/nodejs/node/pull/24513 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-25test: change anonymous function to arrow functionGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24528 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-24net: emit "write after end" errors in the next tickOuyang Yadong
This commit makes those errors caused by calling `net.Socket.write()` after sockets ending be emitted in the next tick. PR-URL: https://github.com/nodejs/node/pull/24457 Fixes: https://github.com/nodejs/node/issues/24111 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-11-24test: split out http2 from test-stream-pipelineRich Trott
Splitting out the http2 portion of the test has a few benfits: * We don't skip the rest of the tests if `node` is compiled without crypto. * We can find out if the http2 portion of the test is responsible for the timeouts reported in issue 24456. Refs: https://github.com/nodejs/node/issues/24456 PR-URL: https://github.com/nodejs/node/pull/24631 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-24test: cover path.basename when path and ext are the sameLaszlo.Moczo
In path.basename was a case when the path and the extension is the same and this wasn't covered with tests. I covered this case both in Windows and Unix environments. PR-URL: https://github.com/nodejs/node/pull/24570 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-25test: fix assert.strictEqualmki-skt
PR-URL: https://github.com/nodejs/node/pull/24619 Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-25test: fix arguments order in assert.strictEqualteppeis
PR-URL: https://github.com/nodejs/node/pull/24591 Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2018-11-24crypto: allow monkey patching of pseudoRandomBytesGerhard Stoebich
Make `pseudoRandomBytes` and it's aliases `prng` and `rng` configurable to allow monkey patching. PR-URL: https://github.com/nodejs/node/pull/24108 Refs: https://github.com/nodejs/node/pull/22519 Refs: https://github.com/nodejs/node/pull/23017 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-24http2: fix session[kSession] undefined issueleeight
`finishSessionDestroy` session cleanup when already done. PR-URL: https://github.com/nodejs/node/pull/24547 Fixes: https://github.com/nodejs/node/issues/24546 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-24test: fix http2-binding strictEqual orderdominikeinkemmer
Switched the order of arguments for strictEqual checks inside of test/paralell/test-http2-binding.js PR-URL: https://github.com/nodejs/node/pull/24616 Refs: https://github.com/nodejsjp/node-1/issues/1 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-11-24test: fix the arguments order in `assert.strictEqual`sota1235
PR-URL: https://github.com/nodejs/node/pull/24595 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-23test: replace callback with arrow functionsprodroy1
PR-URL: https://github.com/nodejs/node/pull/24434 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-24test: use destructuring on requireJuan José Arboleda
PR-URL: https://github.com/nodejs/node/pull/24455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-24test: fix test case in test-child-process-fork-dgram.jsgengjiawen
PR-URL: https://github.com/nodejs/node/pull/24459 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-24test: replace callback with arrow functionssreepurnajasti
PR-URL: https://github.com/nodejs/node/pull/24541 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-23n-api: handle reference delete before finalizeMichael Dawson
Crashes were reported during finalization due to the memory for a reference being deleted and the finalizer running after the deletion. This change ensures the deletion of the memory for the reference only occurs after the finalizer has run. Fixes: https://github.com/nodejs/node-addon-api/issues/393 PR-URL: https://github.com/nodejs/node/pull/24494 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-11-23test: replace callback with arrow functionpotham
PR-URL: https://github.com/nodejs/node/pull/24531 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-23test: replace anonymous function with arrowGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24527 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-23test: replace anonymous function with arrowGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24526 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-23test: add information to assertionRich Trott
test-fs-stat-bigint.js failed once in CI but there wasn't enough information to know what was giong on. Adding a bit of information to the assertion that failed in case it fails again. PR-URL: https://github.com/nodejs/node/pull/24566 Refs: https://github.com/nodejs/node/issues/24565 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-23test: replace anonymous function with arrow funcGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24525 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-23test: change anonymous closure function to arrow functionNethra Ravindran
PR-URL: https://github.com/nodejs/node/pull/24433 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-23test: replace closure functions with arrow functionsGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24522 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-23test: replace anonymous function with arrow functionGagandeep Singh
PR-URL: https://github.com/nodejs/node/pull/24529 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-22test: favor arrow function in callbackPranay Kothapalli
PR-URL: https://github.com/nodejs/node/pull/24542 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-22tls: add min/max protocol version optionsSam Roberts
The existing secureProtocol option only allows setting the allowed protocol to a specific version, or setting it to "all supported versions". It also used obscure strings based on OpenSSL C API functions. Directly setting the min or max is easier to use and explain. PR-URL: https://github.com/nodejs/node/pull/24405 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-22net,dgram: add ipv6Only option for net and dgramOuyang Yadong
For TCP servers, the dual-stack support is enable by default, i.e. binding host "::" will also make "0.0.0.0" bound. This commit add ipv6Only option in `net.Server.listen()` and `dgram.createSocket()` methods which allows to disable dual-stack support. Support for cluster module is also provided in this commit. Fixes: https://github.com/nodejs/node/issues/17664 PR-URL: https://github.com/nodejs/node/pull/23798 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-22http: change DEP0066 to a runtime deprecationMorgan Roderick
Change doc-only deprecation for _headers and _headerNames accessors to a runtime deprecation. PR-URL: https://github.com/nodejs/node/pull/24167 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-22test: remove unused reject handlersDan Foley
PR-URL: https://github.com/nodejs/node/pull/24540 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-11-22test: refactor test to use arrow functionssagirk
In `test/parallel/test-cluster-send-deadlock.js`, callbacks use anonymous closure functions. It is safe to replace them with arrow functions since these callbacks don't contain references to `this`, `super` or `arguments`. This results in shorter functions. PR-URL: https://github.com/nodejs/node/pull/24479 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-22test: replace closure with arrow functionMaya Anilson
PR-URL: https://github.com/nodejs/node/pull/24489 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-22test: using arrow functionsNoSkillGirl
- Using arrow functions in test-tls-client-resume.js - Fixed error, Expected parentheses around arrow function argument arrow-parens PR-URL: https://github.com/nodejs/node/pull/24436 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-22test: replace anonymous closure with arrow funcsuman-mitra
PR-URL: https://github.com/nodejs/node/pull/24480 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-22test: replace callback with arrow functionssreepurnajasti
PR-URL: https://github.com/nodejs/node/pull/24490 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-22test: replcae anonymous closure with arrow functionSarath Govind K K
PR-URL: https://github.com/nodejs/node/pull/24476 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-21test: refactor test-http-write-empty-string to use arrow functionssagirk
In `test/parallel/test-http-write-empty-string.js`, callbacks use anonymous closure functions. Replace them with arrow functions. PR-URL: https://github.com/nodejs/node/pull/24483 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-21http2: throw from mapToHeadersJames M Snell
PR-URL: https://github.com/nodejs/node/pull/24063 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Note: Landed with one collaborator approval after PR was open for 18 days
2018-11-21test: replace anonymous closure with arrow functionssuman-mitra
PR-URL: https://github.com/nodejs/node/pull/24481 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-21stream: correctly pause and resume after once('readable')Matteo Collina
Fixes: https://github.com/nodejs/node/issues/24281 PR-URL: https://github.com/nodejs/node/pull/24366 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-20test: replace anonymous closure functions with arrow functionssagirk
In `test/parallel/test-fs-truncate-fd.js`, callbacks use anonymous closure functions. It is safe to replace them with arrow functions since these callbacks don't alter their context (`this`). This results in shorter functions. PR-URL: https://github.com/nodejs/node/pull/24478 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-20test: replace anonymous closure functions with arrow functionAbhishek Dixit
PR-URL: https://github.com/nodejs/node/pull/24420 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-21test: replace anonymous closure with arrow functPrabu Subra
PR-URL: https://github.com/nodejs/node/pull/24439 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-20test: add whatwg-encoding TextDecoder custom inspection with showHiddenZauberNerd
These tests ensure hidden fields are shown when inspecting with `showHidden` and that passing negative `depth` prints simplified value. Co-authored-by: Robin Drexler <drexler.robin@gmail.com> PR-URL: https://github.com/nodejs/node/pull/24166 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-20readline: add support for async iterationTimothy Gu
Co-authored-by: Ivan Filenko <ivan.filenko@protonmail.com> Fixes: https://github.com/nodejs/node/issues/18603 Refs: https://github.com/nodejs/node/pull/18904 PR-URL: https://github.com/nodejs/node/pull/23916 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>