From 88c21d41d5a92329f8f7a4758efa0eef77605fd5 Mon Sep 17 00:00:00 2001 From: Sorin Date: Fri, 10 Feb 2023 16:38:35 +0200 Subject: [PATCH 1/4] updated axios and axios-ntlm to latest --- package-lock.json | 152 +++++++++++++--------- package.json | 4 +- src/client.ts | 4 +- src/http.ts | 4 +- test/_socketStream.js | 2 +- test/client-customHttp-test.js | 4 +- test/client-customHttp-xsdinclude-test.js | 4 +- 7 files changed, 103 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index ded2302fc..14c4cb06d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "axios-ntlm": "^1.2.0", + "axios-ntlm": "^1.4.0", "debug": "^4.3.2", "formidable": "^3.2.4", "get-stream": "^6.0.1", @@ -58,7 +58,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "axios": "^0.27.2" + "axios": "^1.3.2" } }, "node_modules/@babel/code-frame": { @@ -515,8 +515,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "node_modules/available-typed-arrays": { "version": "1.0.2", @@ -549,36 +548,30 @@ "dev": true }, "node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz", + "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==", "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/axios-ntlm": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.2.0.tgz", - "integrity": "sha512-otkFsbkyx6OySjOSIM1ORbWTm5WSm2m1GZtGx/iQaFaKQ5CVWBy67Bt5KKyRsFQyOkLugVr8pb4q+Dv5XZeltg==", - "dependencies": { - "axios": "^0.21.3" - } - }, - "node_modules/axios-ntlm/node_modules/axios": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz", - "integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.0.tgz", + "integrity": "sha512-4cs0KXSBveFjjWhwsSGOTsuqAovSwOimOpYVW4SEXZWFdQMu3BenxGB/QgHe9yjhXOsOblMDxTwFepKAbkcVow==", "dependencies": { - "follow-redirects": "^1.14.0" + "axios": "^1.3.2", + "des.js": "^1.0.1", + "dev-null": "^0.1.1", + "js-md4": "^0.3.2" } }, "node_modules/axios/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -900,7 +893,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1114,7 +1106,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -1128,12 +1119,26 @@ "node": ">= 0.6" } }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "node_modules/destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, + "node_modules/dev-null": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dev-null/-/dev-null-0.1.1.tgz", + "integrity": "sha512-nMNZG0zfMgmdv8S5O0TM5cpwNbGKRGPCxVsr0SmA3NZZy9CYBbuNLL0PD3Acx9e5LIUgwONXtM9kM6RlawPxEQ==" + }, "node_modules/dezalgo": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", @@ -2048,8 +2053,7 @@ "node_modules/inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -2468,6 +2472,11 @@ "node": ">=6" } }, + "node_modules/js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3127,7 +3136,6 @@ "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -3136,7 +3144,6 @@ "version": "2.1.27", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "dev": true, "dependencies": { "mime-db": "1.44.0" }, @@ -3144,6 +3151,11 @@ "node": ">= 0.6" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3644,6 +3656,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -5446,8 +5463,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "available-typed-arrays": { "version": "1.0.2", @@ -5471,20 +5487,19 @@ "dev": true }, "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz", + "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==", "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" }, "dependencies": { "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -5494,21 +5509,14 @@ } }, "axios-ntlm": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.2.0.tgz", - "integrity": "sha512-otkFsbkyx6OySjOSIM1ORbWTm5WSm2m1GZtGx/iQaFaKQ5CVWBy67Bt5KKyRsFQyOkLugVr8pb4q+Dv5XZeltg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.0.tgz", + "integrity": "sha512-4cs0KXSBveFjjWhwsSGOTsuqAovSwOimOpYVW4SEXZWFdQMu3BenxGB/QgHe9yjhXOsOblMDxTwFepKAbkcVow==", "requires": { - "axios": "^0.21.3" - }, - "dependencies": { - "axios": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz", - "integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==", - "requires": { - "follow-redirects": "^1.14.0" - } - } + "axios": "^1.3.2", + "des.js": "^1.0.1", + "dev-null": "^0.1.1", + "js-md4": "^0.3.2" } }, "bail": { @@ -5767,7 +5775,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -5943,8 +5950,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "depd": { "version": "1.1.2", @@ -5952,12 +5958,26 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, + "dev-null": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dev-null/-/dev-null-0.1.1.tgz", + "integrity": "sha512-nMNZG0zfMgmdv8S5O0TM5cpwNbGKRGPCxVsr0SmA3NZZy9CYBbuNLL0PD3Acx9e5LIUgwONXtM9kM6RlawPxEQ==" + }, "dezalgo": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", @@ -6662,8 +6682,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ipaddr.js": { "version": "1.9.1", @@ -6944,6 +6963,11 @@ "html-escaper": "^2.0.0" } }, + "js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7453,18 +7477,21 @@ "mime-db": { "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "dev": true + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { "version": "2.1.27", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "dev": true, "requires": { "mime-db": "1.44.0" } }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -7861,6 +7888,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", diff --git a/package.json b/package.json index 091f81ea0..ff6bdb6b0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "author": "Vinay Pulim ", "dependencies": { - "axios-ntlm": "^1.2.0", + "axios-ntlm": "^1.4.0", "debug": "^4.3.2", "formidable": "^3.2.4", "get-stream": "^6.0.1", @@ -19,7 +19,7 @@ "xml-crypto": "^3.0.0" }, "peerDependencies": { - "axios": "^0.27.2" + "axios": "^1.3.2" }, "repository": { "type": "git", diff --git a/src/client.ts b/src/client.ts index 7892b8baf..22c7a945f 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,10 +4,10 @@ */ import * as assert from 'assert'; +import { AxiosResponseHeaders, RawAxiosResponseHeaders } from 'axios'; import * as debugBuilder from 'debug'; import { EventEmitter } from 'events'; import getStream = require('get-stream'); -import { IncomingHttpHeaders } from 'http'; import * as _ from 'lodash'; import { v4 as uuidv4 } from 'uuid'; import { HttpClient } from './http'; @@ -51,7 +51,7 @@ export class Client extends EventEmitter { public lastEndpoint?: string; public lastRequestHeaders?: any; public lastResponse?: any; - public lastResponseHeaders?: IncomingHttpHeaders; + public lastResponseHeaders?: AxiosResponseHeaders | RawAxiosResponseHeaders; public lastElapsedTime?: number; public lastResponseAttachments: IMTOMAttachments; diff --git a/src/http.ts b/src/http.ts index ba5369815..15d0ac430 100644 --- a/src/http.ts +++ b/src/http.ts @@ -39,7 +39,7 @@ export class HttpClient implements IHttpClient { constructor(options?: IOptions) { options = options || {}; this.options = options; - this._request = options.request || req.default.create(); + this._request = options.request || req.create(); } /** @@ -226,7 +226,7 @@ export class HttpClient implements IHttpClient { if (err) { return callback(err); } - // first part is the soap response + // first part is the soap response const firstPart = multipartResponse.parts.shift(); if (!firstPart || !firstPart.body) { return callback(new Error('Cannot parse multipart response')); diff --git a/test/_socketStream.js b/test/_socketStream.js index 16a4c08cd..a00074f33 100644 --- a/test/_socketStream.js +++ b/test/_socketStream.js @@ -37,7 +37,7 @@ module.exports = function createSocketStream(file, length) { var chunk = socketStream.req.read(); should.exist(chunk); - var header = 'HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\nContent-Length: ' + length + '\r\n\r\n'; + var header = 'HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\nContent-Length: ' + (!length ? wsdl.length : length) + '\r\n\r\n'; //This is for compatibility with old node releases <= 0.10 //Hackish diff --git a/test/client-customHttp-test.js b/test/client-customHttp-test.js index 1d68a2725..0742ae860 100644 --- a/test/client-customHttp-test.js +++ b/test/client-customHttp-test.js @@ -94,9 +94,9 @@ it('should allow customization of httpClient and the wsdl file download should p }); } //Now write the response with the wsdl - var state = httpResStream.write('HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\nContent-Length: 1904\r\n\r\n'+wsdl); + var state = httpResStream.write('HTTP/1.1 200 OK\r\nContent-Type: text/xml; charset=utf-8\r\nContent-Length: '+wsdl.length+'\r\n\r\n'+wsdl); }); - + var httpCustomClient = new MyHttpClient({}, socketStream); var url = 'http://localhost:50000/Platform.asmx?wsdl'; soap.createClient(url, diff --git a/test/client-customHttp-xsdinclude-test.js b/test/client-customHttp-xsdinclude-test.js index 652de366b..13da118c7 100644 --- a/test/client-customHttp-xsdinclude-test.js +++ b/test/client-customHttp-xsdinclude-test.js @@ -60,8 +60,8 @@ it('should allow customization of httpClient, the wsdl file, and associated data }; var httpCustomClient = new MyHttpClient({}, - createSocketStream(__dirname + '/wsdl/xsdinclude/xsd_include_http.wsdl', 2708), - createSocketStream(__dirname + '/wsdl/xsdinclude/types.xsd', 982) + createSocketStream(__dirname + '/wsdl/xsdinclude/xsd_include_http.wsdl'), + createSocketStream(__dirname + '/wsdl/xsdinclude/types.xsd') ); var url = 'http://localhost:50000/Dummy.asmx?wsdl'; soap.createClient(url, From 95c464c5d745876a87859cd71932f81bbe8d577d Mon Sep 17 00:00:00 2001 From: Sorin Date: Fri, 14 Apr 2023 22:04:19 +0300 Subject: [PATCH 2/4] Fix build in Node.js 18 by re-encrypting test key --- test/certs/agent2-key-with-password.pem | 19 ++++++++++--------- test/server-test.js | 10 +++++++--- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/test/certs/agent2-key-with-password.pem b/test/certs/agent2-key-with-password.pem index 7d47b552a..573a3e5dd 100644 --- a/test/certs/agent2-key-with-password.pem +++ b/test/certs/agent2-key-with-password.pem @@ -1,11 +1,12 @@ -----BEGIN ENCRYPTED PRIVATE KEY----- -MIIBgTAbBgkqhkiG9w0BBQMwDgQICq+TjRaVRpYCAggABIIBYIW7b0BY6bWa1tcl -kW9xqSNyMI6C051rPqMzbN8jTrKneHSaegCCDd6fDDyH3vXJaxxzmgnGuRBHEv/6 -8tTTbQERI1VnjYAH3dgYIdi3k1YYCKHatPK7El1B3ffWhiW8t1jNOWRC6p00VbIN -SYKrTs8s1JGoMkeKp6N1jATbnPcuqPut3MdQjV/7cHMJJC2t8dDfiKspRB2x/bDY -6S665JLXUpAhTvSVehtBIoXA9BBGVanbhgT4vyx9T4PJKmsiylrz4cTDeoeXPkE/ -eWx0IDJr7uyllCkzY4nftEKRZdjUZa4dzvLlZpbW1bppPi0j8yjvt0YE5qEf+LNZ -8QvE3We5eOE76tYBfA44yUwUJJ8coTg4/mOomaZnW+LRdH9jxQdDIYesZkR4dosO -f3lqR5GTZGpr/qaI//Pf1r6nRCDw9Oqi+knPJUNqAJh13Y7jvFedIdAL6vJXFZxq -PsZxAOE= +MIIBvTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIeCPjj50AYmgCAggA +MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBCEkXowWEmMgYbOpWWJSoaKBIIB +YKP5Gj6LiydCZmU+leC8obpeaJMKllmtwh48TZzDvA52bBFqPIsahmRRfwDiTOSp +akc8VqxBIb4jYa71fIjKeserYZn+1hxbj3Cr6HcSPQZmCfQCFCDY52JF/44iaZqx +Yioh0XEacW+RZeLFf05sYZu/isoTKpANlbEc3fLds+CwM9lGCOgwOdkzO5CdvnoN +F3sq24CsZOKUT1fhfqAGhkv2zPyzC3lOQ8j8IsI8m1T/qC5/m4cJhu8roDvxTxRS +PhsONSuBUznYOeXnuY+9cTjaKDYLiFsbCCzncgp7xF22hNl5unMvDPk7ZARIPMC5 +0TQDiqbr4FRUPA4TbziRZixuzsMupkUoQe5mS0EmHfNbjOMIllj8BQFIXLIugX3h +eGua84R2u/Yh4SO/S8NkjNEH24Unvl+dn9u7rSaEC1acG41aKR3RYJYW4P02QCmN +QzVvyBz4irCA+6h3fNVXd6Q= -----END ENCRYPTED PRIVATE KEY----- diff --git a/test/server-test.js b/test/server-test.js index 180c1ac30..6efea2863 100644 --- a/test/server-test.js +++ b/test/server-test.js @@ -340,9 +340,13 @@ describe('SOAP Server', function () { soap.createClient(test.baseUrl + '/stockquote?wsdl', function (err, client) { assert.ifError(err); client.IsValidPrice({ price: 50000 }, function (err, result) { - // node V3.x+ reports addresses as IPV6 - var addressParts = lastReqAddress.split(':'); - assert.equal(addressParts[(addressParts.length - 1)], '127.0.0.1'); + // One of these should match, depending on the network configuration of the host + var localhostAddresses = [ + '127.0.0.1', + '::ffff:127.0.0.1', + '::1' + ]; + assert.notEqual(localhostAddresses.indexOf(lastReqAddress), -1); done(); }); }); From 904453a9b5faf8f9c9db3ae5e5a01946c69085d4 Mon Sep 17 00:00:00 2001 From: Sorin Date: Thu, 24 Aug 2023 18:02:45 +0300 Subject: [PATCH 3/4] update axios to 1.4.0 --- package-lock.json | 48 ++++++++++++++--------------------------------- package.json | 4 ++-- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14c4cb06d..4a6236d99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "axios-ntlm": "^1.4.0", + "axios-ntlm": "^1.4.1", "debug": "^4.3.2", "formidable": "^3.2.4", "get-stream": "^6.0.1", @@ -58,7 +58,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "axios": "^1.3.2" + "axios": "^1.4.0" } }, "node_modules/@babel/code-frame": { @@ -548,9 +548,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz", - "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -558,9 +558,9 @@ } }, "node_modules/axios-ntlm": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.0.tgz", - "integrity": "sha512-4cs0KXSBveFjjWhwsSGOTsuqAovSwOimOpYVW4SEXZWFdQMu3BenxGB/QgHe9yjhXOsOblMDxTwFepKAbkcVow==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.1.tgz", + "integrity": "sha512-6dKPhsfxONR3PyXFMsUM5g55cYNKifgkV2NV+ZesAHryKLeO+WhNgSnJecDER6jGUCl13OEhu8tCOLUMJFMGEQ==", "dependencies": { "axios": "^1.3.2", "des.js": "^1.0.1", @@ -4562,18 +4562,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/unbox-primitive/node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/underscore": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", @@ -5487,9 +5475,9 @@ "dev": true }, "axios": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz", - "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -5509,9 +5497,9 @@ } }, "axios-ntlm": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.0.tgz", - "integrity": "sha512-4cs0KXSBveFjjWhwsSGOTsuqAovSwOimOpYVW4SEXZWFdQMu3BenxGB/QgHe9yjhXOsOblMDxTwFepKAbkcVow==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.1.tgz", + "integrity": "sha512-6dKPhsfxONR3PyXFMsUM5g55cYNKifgkV2NV+ZesAHryKLeO+WhNgSnJecDER6jGUCl13OEhu8tCOLUMJFMGEQ==", "requires": { "axios": "^1.3.2", "des.js": "^1.0.1", @@ -8615,14 +8603,6 @@ "has-bigints": "^1.0.1", "has-symbols": "^1.0.2", "which-boxed-primitive": "^1.0.2" - }, - "dependencies": { - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - } } }, "underscore": { diff --git a/package.json b/package.json index ff6bdb6b0..29bd4a6aa 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "author": "Vinay Pulim ", "dependencies": { - "axios-ntlm": "^1.4.0", + "axios-ntlm": "^1.4.1", "debug": "^4.3.2", "formidable": "^3.2.4", "get-stream": "^6.0.1", @@ -19,7 +19,7 @@ "xml-crypto": "^3.0.0" }, "peerDependencies": { - "axios": "^1.3.2" + "axios": "^1.4.0" }, "repository": { "type": "git", From a02704b43ae1958747af88fdd7e01e38039bccb4 Mon Sep 17 00:00:00 2001 From: Sorin Date: Mon, 28 Aug 2023 18:08:46 +0300 Subject: [PATCH 4/4] axios updates --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a6236d99..9821801db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "axios": "^1.4.0" + "axios": "^1.5.0" } }, "node_modules/@babel/code-frame": { @@ -548,9 +548,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -5475,9 +5475,9 @@ "dev": true }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", diff --git a/package.json b/package.json index 29bd4a6aa..383a10be1 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "xml-crypto": "^3.0.0" }, "peerDependencies": { - "axios": "^1.4.0" + "axios": "^1.5.0" }, "repository": { "type": "git",