From d25e7726a7d52f86acc0e12bb67a794f3b87ceab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 23 Jan 2026 12:31:09 -0500 Subject: [PATCH] fix: #13918, make arrayLimit configurable increase default to 50 cap at 100 --- install/package.json | 1 + src/webserver.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/install/package.json b/install/package.json index 5203b0b8d1..f37a7e1684 100644 --- a/install/package.json +++ b/install/package.json @@ -124,6 +124,7 @@ "pretty": "^2.0.0", "progress-webpack-plugin": "1.0.16", "prompt": "1.3.0", + "qs": "6.14.1", "redis": "5.10.0", "rimraf": "6.1.2", "rss": "1.2.2", diff --git a/src/webserver.js b/src/webserver.js index 18f57faa40..1aa7f2387d 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -137,6 +137,12 @@ function setupExpressApp(app) { app.set('view engine', 'tpl'); app.set('views', viewsDir); app.set('json spaces', global.env === 'development' ? 4 : 0); + + // https://github.com/NodeBB/NodeBB/issues/13918 + const qs = require('qs'); + app.set('query parser', str => qs.parse(str, { + arrayLimit: Math.max(100, nconf.get('queryParser:arrayLimit') || 50), + })); app.use(flash()); app.enable('view cache');