Browse Source

bug #1955

(cherry picked from commit 5b1c642fb9)
tags/v0.11.0.6
Shaun 1 year ago
committed by Big Bad Waffle
parent
commit
c70ae569ef
2 changed files with 13 additions and 1 deletions
  1. +12
    -0
      src/server/security/router.js
  2. +1
    -1
      src/server/security/routerConfig.js

+ 12
- 0
src/server/security/router.js View File

@@ -72,6 +72,18 @@ module.exports = {
)
);

return !isCorrect;
} else if (dataType === 'integerNullObjectOrString') {
const isCorrect = (
Number.isInteger(value) ||
typeof(dataType) === 'string' ||
value === null ||
(
typeof(value) === 'object' &&
this.keysCorrect(value, spec)
)
);

return !isCorrect;
} else if (dataType === 'arrayOfStrings')
return (!Array.isArray(value) || value.some(v => typeof(v) !== 'string'));


+ 1
- 1
src/server/security/routerConfig.js View File

@@ -165,7 +165,7 @@ const routerConfig = {
},
{
key: 'target',
dataType: 'integerNullOrObject',
dataType: 'integerNullObjectOrString',
spec: [
{
key: 'x',


Loading…
Cancel
Save