Skip to content

Commit

Permalink
Update security.md -> ReDoS Attack Section (#1953)
Browse files Browse the repository at this point in the history
I made a mistake with one of the code snippets in the documentation. The 'regExp' attribute belongs to the code options, not the ajv options directly.

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
  • Loading branch information
efebarlas and epoberezkin committed Nov 13, 2022
1 parent 67e7f1c commit b2a109c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/security.md
Expand Up @@ -72,7 +72,7 @@ To use a third-party regex engine in Ajv, set the ajv.opts.code.regExp property
```
const Ajv = require("ajv")
const RE2 = require("re2")
const ajv = new Ajv({regExp: RE2})
const ajv = new Ajv({code: {regExp: RE2}})
```

For details about the interface of the `regexp` option, see options.md under the docs folder.
Expand Down

0 comments on commit b2a109c

Please sign in to comment.