From 7626a13e420021410caec3c6c1ba46b2ff33a940 Mon Sep 17 00:00:00 2001 From: Frank Jogeleit Date: Fri, 19 Feb 2021 11:36:10 +0100 Subject: [PATCH] Disable MaxContentLength and MaxBodyLength check (#23) * Disable MaxContentLength and MaxBodyLength check --- package-lock.json | 22 +++++++++++----------- package.json | 4 ++-- src/httpClient.js | 6 ++++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 66fa41b..8786dbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "http-request-action", - "version": "1.7.1", + "version": "1.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -47,9 +47,9 @@ "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "form-data": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", - "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -57,16 +57,16 @@ } }, "mime-db": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", - "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" }, "mime-types": { - "version": "2.1.28", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", - "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", "requires": { - "mime-db": "1.45.0" + "mime-db": "1.46.0" } } } diff --git a/package.json b/package.json index 79fe69a..13f2b59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "http-request-action", - "version": "1.7.1", + "version": "1.7.2", "description": "", "main": "src/index.js", "private": false, @@ -24,6 +24,6 @@ "dependencies": { "@zeit/ncc": "^0.22", "axios": "^0.21.1", - "form-data": "^3.0.0" + "form-data": "^3.0.1" } } diff --git a/src/httpClient.js b/src/httpClient.js index 1c2acd0..9db35be 100644 --- a/src/httpClient.js +++ b/src/httpClient.js @@ -9,7 +9,7 @@ const request = async({ method, instanceConfig, data, files, auth, actions, prev try { if (escapeData) { data = data.replace(/"[^"]*"/g, (match) => { - return match.replace(/[\n\r]\s*/g, "\\n"); + return match.replace(/[\n\r]\s*/g, "\\n"); }); } @@ -35,7 +35,9 @@ const request = async({ method, instanceConfig, data, files, auth, actions, prev const requestData = { auth, method, - data + data, + maxContentLength: Infinity, + maxBodyLength: Infinity } actions.debug('Instance Configuration: ' + JSON.stringify(instanceConfig))