mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed CVE-2020-13596 -- Fixed potential XSS in admin ForeignKeyRawIdWidget.
This commit is contained in:
committed by
Carlton Gibson
parent
81dc710571
commit
2dd4d110c1
@@ -27,6 +27,14 @@ class Band(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
class UnsafeLimitChoicesTo(models.Model):
|
||||
band = models.ForeignKey(
|
||||
Band,
|
||||
models.CASCADE,
|
||||
limit_choices_to={'name': '"&><escapeme'},
|
||||
)
|
||||
|
||||
|
||||
class Album(models.Model):
|
||||
band = models.ForeignKey(Band, models.CASCADE)
|
||||
featuring = models.ManyToManyField(Band, related_name='featured')
|
||||
|
||||
Reference in New Issue
Block a user