Skip to content

Commit

Permalink
fix: security update
Browse files Browse the repository at this point in the history
  • Loading branch information
willfarrell committed Nov 3, 2024
1 parent 4834c17 commit 0a668ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/validator/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const compileSchema = (schema, options = {}) => {
const ajvDefaults = {
strict: true,
coerceTypes: 'array', // important for query string params
allErrors: true,
allErrors: false, // As per AJV security guidance
useDefaults: 'empty',
messages: true // needs to be true to allow multi-locale errorMessage to work
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/middlewares/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Transpile JSON-Schema in to JavaScript. Default ajv plugins used: `ajv-i18n`, `a

- `schema` (object) (required): JSON-Schema object
- `ajvOptions` (object) (default `undefined`): Options to pass to [ajv](https://ajv.js.org/docs/api.html#options)
class constructor. Defaults are `{ strict: true, coerceTypes: 'array', allErrors: true, useDefaults: 'empty', messages: true }`.
class constructor. Defaults are `{ strict: true, coerceTypes: 'array', allErrors: false, useDefaults: 'empty', messages: true }`.

## transpileLocale

Expand Down
2 changes: 1 addition & 1 deletion website/docs/upgrade/5-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ No change

### [validator](/docs/middlewares/validator)

No change
- Remove `allErrors:true` from default options.

### [warmup](/docs/middlewares/warmup)

Expand Down

0 comments on commit 0a668ae

Please sign in to comment.