From cdecde220f0eeea4d70a5a92d10170a358f3fee5 Mon Sep 17 00:00:00 2001 From: TemitopeAyokuHO Date: Tue, 23 Jul 2024 08:59:52 +0100 Subject: [PATCH] ACRS-211-Bugfix For over 1500 characters - I have added this changes to HOF framework version : 21.0.1 and 20.5.7-Beta-payload-too-large. - Added two variable in the config.js to allow a dynamic body parser size be increased by developer. --- config.js | 4 +++- package.json | 2 +- server.js | 1 + yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config.js b/config.js index 7a59487d..c8d7f12e 100644 --- a/config.js +++ b/config.js @@ -88,5 +88,7 @@ module.exports = { uniqueReferralRefs: { refLength: 6, refAllowedChars: 'ABCDEFGHJKMNPRTUVWXY0123456789' - } + }, + urlEncodedLimitSize: process.env.URL_ENCODED_LIMIT_SIZE || '2mb', + jsonLimitSize: process.env.JSON_LIMIT_SIZE || '2mb' }; diff --git a/package.json b/package.json index 0b6b6823..71a396ab 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "bytes": "^3.1.2", "crypto-random-string": "^5.0.0", "dotenv": "^16.3.1", - "hof": "~20.5.0", + "hof": "20.5.7-Beta-payload-too-large", "ioredis": "^5.4.1", "jquery": "^3.7.1", "lodash": "^4.17.21", diff --git a/server.js b/server.js index fc2102c8..3cdb4712 100644 --- a/server.js +++ b/server.js @@ -15,6 +15,7 @@ settings = Object.assign({}, settings, { behaviours: settings.behaviours.map(require) }); + if (!fs.existsSync(config.dataDirectory)) { fs.mkdirSync(config.dataDirectory); } diff --git a/yarn.lock b/yarn.lock index 06b1cdf3..6124a732 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3121,10 +3121,10 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hof@~20.5.0: - version "20.5.2" - resolved "https://registry.yarnpkg.com/hof/-/hof-20.5.2.tgz#1a7a5660fd8a92991903619b18fca5c7e624201c" - integrity sha512-TdENaThMn36S6J2vpjRoujAEtJuDKmkwUEfuqVyXZFOqboFN1/nuC9NnYimKkcxvMxq61rWQDsmwNgO/wQN6cQ== +hof@20.5.7-Beta-payload-too-large: + version "20.5.7-Beta-payload-too-large" + resolved "https://registry.yarnpkg.com/hof/-/hof-20.5.7-Beta-payload-too-large.tgz#b04fb9ee3449eafad622a51668aa1eae174cdc58" + integrity sha512-9kFekPljshg5UpY0TUu80hsikWCM2ffl57NhNNZMpPaNSXapHnhl+TK3Lr7lDqJPWWLE14cewl5ICkP+thV8Lg== dependencies: aliasify "^2.1.0" bluebird "^3.7.2"