Skip to content

Commit 1761420

Browse files
authored
Merge commit from fork
[PATCH] Patch Class Pollution Vulnerability
2 parents 7dcb010 + 5d59358 commit 1761420

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)