We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e578e9 commit e8f5450Copy full SHA for e8f5450
src/backend/src/modules/web/WebServerService.js
@@ -520,6 +520,22 @@ class WebServerService extends BaseService {
520
app.use(helmet.xssFilter());
521
// app.use(helmet.referrerPolicy());
522
app.disable('x-powered-by');
523
+
524
+ // remove object and array query parameters
525
+ app.use(function (req, res, next) {
526
+ for ( let k in req.query ) {
527
+ if ( req.query[k] === undefined || req.query[k] === null ) {
528
+ continue;
529
+ }
530
531
+ const allowed_types = ['string', 'number', 'boolean'];
532
+ if ( ! allowed_types.includes(typeof req.query[k]) ) {
533
+ req.query[k] = undefined;
534
535
536
+ console.log('\x1B[36;1m======= ok???', req.query);
537
+ next();
538
+ });
539
540
const uaParser = require('ua-parser-js');
541
app.use(function (req, res, next) {
0 commit comments