Disable MaxContentLength and MaxBodyLength check (#23)

* Disable MaxContentLength and MaxBodyLength check
This commit is contained in:
Frank Jogeleit 2021-02-19 11:36:10 +01:00 committed by GitHub
parent 48dc3972df
commit 7626a13e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 15 deletions

22
package-lock.json generated
View file

@ -1,6 +1,6 @@
{ {
"name": "http-request-action", "name": "http-request-action",
"version": "1.7.1", "version": "1.7.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -47,9 +47,9 @@
"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
}, },
"form-data": { "form-data": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": { "requires": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
@ -57,16 +57,16 @@
} }
}, },
"mime-db": { "mime-db": {
"version": "1.45.0", "version": "1.46.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
"integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ=="
}, },
"mime-types": { "mime-types": {
"version": "2.1.28", "version": "2.1.29",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
"integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
"requires": { "requires": {
"mime-db": "1.45.0" "mime-db": "1.46.0"
} }
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "http-request-action", "name": "http-request-action",
"version": "1.7.1", "version": "1.7.2",
"description": "", "description": "",
"main": "src/index.js", "main": "src/index.js",
"private": false, "private": false,
@ -24,6 +24,6 @@
"dependencies": { "dependencies": {
"@zeit/ncc": "^0.22", "@zeit/ncc": "^0.22",
"axios": "^0.21.1", "axios": "^0.21.1",
"form-data": "^3.0.0" "form-data": "^3.0.1"
} }
} }

View file

@ -9,7 +9,7 @@ const request = async({ method, instanceConfig, data, files, auth, actions, prev
try { try {
if (escapeData) { if (escapeData) {
data = data.replace(/"[^"]*"/g, (match) => { 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 = { const requestData = {
auth, auth,
method, method,
data data,
maxContentLength: Infinity,
maxBodyLength: Infinity
} }
actions.debug('Instance Configuration: ' + JSON.stringify(instanceConfig)) actions.debug('Instance Configuration: ' + JSON.stringify(instanceConfig))