From 51664fc265bf4ce9757f18b7b78f18b34678b3e3 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 18 May 2017 14:19:21 -0400 Subject: 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 Reviewed-By: Refael Ackermann Reviewed-By: Joyee Cheung --- lib/internal/net.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/internal/net.js') diff --git a/lib/internal/net.js b/lib/internal/net.js index ce8f549bdf..d4558cfca8 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') }; -- cgit v1.2.3