Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-05-18 21:19:21 +0300
committercjihrig <cjihrig@gmail.com>2017-05-19 18:22:40 +0300
commit51664fc265bf4ce9757f18b7b78f18b34678b3e3 (patch)
tree4de8803f650f970c5d8b8256ecbfd97d3c3f5583 /lib/internal/net.js
parent6b1819cff59c674d03f0afca80f33369b36b3926 (diff)
net: add symbol to normalized connect() args
This commit attaches a Symbol to the result of net._normalizeArgs(). This prevents normal arrays from being passed to the internal Socket.prototype.connect() bypass logic. PR-URL: https://github.com/nodejs/node/pull/13069 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/internal/net.js')
-rw-r--r--lib/internal/net.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/internal/net.js b/lib/internal/net.js
index ce8f549bdfa..d4558cfca8e 100644
--- a/lib/internal/net.js
+++ b/lib/internal/net.js
@@ -10,5 +10,6 @@ function isLegalPort(port) {
}
module.exports = {
- isLegalPort
+ isLegalPort,
+ normalizedArgsSymbol: Symbol('normalizedArgs')
};