Skip to content

Commit 2bb4ee7

Browse files
committed
Add an additional banner warning users about accepting untrusted schemas.
1 parent 0306c83 commit 2bb4ee7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/spelling-wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ recurses
3737
regex
3838
repr
3939
runtime
40+
sandboxing
4041
sensical
4142
subclassing
4243
submodule

docs/validate.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ Schema Validation
1111

1212
If you aren't already comfortable with writing schemas and need an introduction which teaches about JSON Schema the specification, you may find :ujs:`Understanding JSON Schema </>` to be a good read!
1313

14-
1514
The Basics
1615
----------
1716

18-
The simplest way to validate an instance under a given schema is to use the
19-
`validate <jsonschema.validators.validate>` function.
17+
The simplest way to validate an instance under a given schema is to use the `validate <jsonschema.validators.validate>` function.
2018

2119
.. autofunction:: validate
2220
:noindex:
2321

22+
.. warning::
23+
24+
Accepting untrusted schemas as input, especially when combined with untrusted data to validate, can lead to vulnerabilities even when restricting to official JSON Schema dialects and vocabularies.
25+
Never validate data against schemas from untrusted sources without proper sandboxing or input validation.
26+
2427
.. _validator-protocol:
2528

2629
The Validator Protocol

0 commit comments

Comments
 (0)