Skip to content

Commit 5d59358

Browse files
committed
[PATCH] Patch Class Pollution Vulnerability
1 parent 7dcb010 commit 5d59358

File tree

1 file changed

+3
-0
lines changed
  • django_unicorn/views/action_parsers

1 file changed

+3
-0
lines changed

django_unicorn/views/action_parsers/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class TestView(UnicornView):
5050
The following code updates UnicornView.author.name based the payload's `author.name`.
5151
"""
5252
property_name_parts = property_name.split(".")
53+
for part in property_name_parts:
54+
if part.startswith("__") and part.endswith("__"):
55+
raise AssertionError("Invalid property name")
5356
component_or_field = component
5457
data_or_dict = data # Could be an internal portion of data that gets set
5558

0 commit comments

Comments
 (0)