Skip to content

Commit b274204

Browse files
miss-islingtonencukouStanFromIreland
authored
[3.13] gh-111264: Add a note about untrusted input to tomllib docs (#149226)
(cherry picked from commit 9d41e2a) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 302ef21 commit b274204

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/library/tomllib.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ This module provides an interface for parsing TOML 1.0.0 (Tom's Obvious Minimal
1717
Language, `https://toml.io <https://toml.io/en/>`_). This module does not
1818
support writing TOML.
1919

20+
.. warning::
21+
22+
Be cautious when parsing data from untrusted sources.
23+
A malicious TOML string may cause the decoder to consume considerable
24+
CPU and memory resources.
25+
Limiting the size of data to be parsed is recommended.
26+
2027
.. seealso::
2128

2229
The :pypi:`Tomli-W package <tomli-w>`

0 commit comments

Comments
 (0)