diff options
author | Anto Aravinth <anto.aravinth.cse@gmail.com> | 2018-07-28 12:12:32 +0530 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2018-08-06 09:24:41 +0200 |
commit | 980877ffa2fc9a77e311566c537cee6d037578a2 (patch) | |
tree | e250168a95104595d5609b2e8f8295f014f62302 /test/parallel/test-http2-debug.js | |
parent | 933d8eb689bb4bc412e71c0069bf9b7b24de4f9d (diff) | |
download | android-node-v8-980877ffa2fc9a77e311566c537cee6d037578a2.tar.gz android-node-v8-980877ffa2fc9a77e311566c537cee6d037578a2.tar.bz2 android-node-v8-980877ffa2fc9a77e311566c537cee6d037578a2.zip |
util: adding warnings when NODE_DEBUG is set as http/http2
PR-URL: https://github.com/nodejs/node/pull/21914
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-debug.js')
-rw-r--r-- | test/parallel/test-http2-debug.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-http2-debug.js b/test/parallel/test-http2-debug.js index e80c9e3628..ad86e76ab7 100644 --- a/test/parallel/test-http2-debug.js +++ b/test/parallel/test-http2-debug.js @@ -7,10 +7,13 @@ const child_process = require('child_process'); const path = require('path'); process.env.NODE_DEBUG_NATIVE = 'http2'; +process.env.NODE_DEBUG = 'http2'; const { stdout, stderr } = child_process.spawnSync(process.execPath, [ path.resolve(__dirname, 'test-http2-ping.js') ], { encoding: 'utf8' }); +assert(stderr.match(/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data \(such as passwords, tokens and authentication headers\) in the resulting log\./), + stderr); assert(stderr.match(/Http2Session client \(\d+\) handling data frame for stream \d+/), stderr); assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting/), |