summaryrefslogtreecommitdiff
path: root/django/core/exceptions.py
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2022-12-13 10:27:39 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2023-02-14 08:24:06 +0100
commit628b33a854a9c68ec8a0c51f382f304a0044ec92 (patch)
tree3da9d68becb1a4f9170944a6e1591dcc5946db8a /django/core/exceptions.py
parent425c75f56f4f05950826e7e7022ea764f8627eb1 (diff)
[4.1.x] Fixed CVE-2023-24580 -- Prevented DoS with too many uploaded files.
Thanks to Jakob Ackermann for the report.
Diffstat (limited to 'django/core/exceptions.py')
-rw-r--r--django/core/exceptions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/django/core/exceptions.py b/django/core/exceptions.py
index 7be4e16bc5..e06b33e7bc 100644
--- a/django/core/exceptions.py
+++ b/django/core/exceptions.py
@@ -67,6 +67,15 @@ class TooManyFieldsSent(SuspiciousOperation):
pass
+class TooManyFilesSent(SuspiciousOperation):
+ """
+ The number of fields in a GET or POST request exceeded
+ settings.DATA_UPLOAD_MAX_NUMBER_FILES.
+ """
+
+ pass
+
+
class RequestDataTooBig(SuspiciousOperation):
"""
The size of the request (excluding any file uploads) exceeded