]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-111264: Add a note about untrusted input to tomllib docs (GH-146209) (GH...
authorPetr Viktorin <encukou@gmail.com>
Fri, 1 May 2026 12:42:33 +0000 (14:42 +0200)
committerGitHub <noreply@github.com>
Fri, 1 May 2026 12:42:33 +0000 (14:42 +0200)
(cherry picked from commit 9d41e2a534aab460dd656ef251adaed5d2d64b93)

Co-authored-by: Stan Ulbrych <stan@python.org>
Doc/library/tomllib.rst

index 30d7ff50a1acc114a6d7bc771685791eaab1e6fd..95b2c91314c4d65b23fc5b932738eaf1a77b98aa 100644 (file)
@@ -17,6 +17,13 @@ This module provides an interface for parsing TOML 1.0.0 (Tom's Obvious Minimal
 Language, `https://toml.io <https://toml.io/en/>`_). This module does not
 support writing TOML.
 
+.. warning::
+
+   Be cautious when parsing data from untrusted sources.
+   A malicious TOML string may cause the decoder to consume considerable
+   CPU and memory resources.
+   Limiting the size of data to be parsed is recommended.
+
 .. seealso::
 
     The :pypi:`Tomli-W package <tomli-w>`