A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/django/django/commit/1f2dd37f6fcefdd10ed44cb233b2e62b520afb38 below:

[3.0.x] Fixed CVE-2020-13596 -- Fixed potential XSS in admin ForeignK… · django/django@1f2dd37 · GitHub

22 22

from .models import (

23 23

Advisor, Album, Band, Bee, Car, Company, Event, Honeycomb, Individual,

24 24

Inventory, Member, MyFileField, Profile, School, Student,

25 +

UnsafeLimitChoicesTo,

25 26

)

26 27

from .widgetadmin import site as widget_admin_site

27 28

@@ -586,6 +587,16 @@ def test_proper_manager_for_label_lookup(self):

586 587

'Hidden</a></strong>' % {'pk': hidden.pk}

587 588

)

588 589 590 +

def test_render_unsafe_limit_choices_to(self):

591 +

rel = UnsafeLimitChoicesTo._meta.get_field('band').remote_field

592 +

w = widgets.ForeignKeyRawIdWidget(rel, widget_admin_site)

593 +

self.assertHTMLEqual(

594 +

w.render('test', None),

595 +

'<input type="text" name="test" class="vForeignKeyRawIdAdminField">\n'

596 +

'<a href="/admin_widgets/band/?name=%22%26%3E%3Cescapeme&amp;_to_field=id" '

597 +

'class="related-lookup" id="lookup_id_test" title="Lookup"></a>'

598 +

)

599 + 589 600 590 601

@override_settings(ROOT_URLCONF='admin_widgets.urls')

591 602

class ManyToManyRawIdWidgetTest(TestCase):


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4