1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

[1.5.x] Prevented reverse() from generating URLs pointing to other hosts.

This is a security fix. Disclosure following shortly.
This commit is contained in:
Florian Apolloner
2014-07-17 21:59:28 +02:00
committed by Tim Graham
parent 25d9ae5214
commit 45ac9d4fb0
5 changed files with 34 additions and 0 deletions

View File

@@ -143,6 +143,9 @@ test_data = (
('defaults', '/defaults_view2/3/', [], {'arg1': 3, 'arg2': 2}),
('defaults', NoReverseMatch, [], {'arg1': 3, 'arg2': 3}),
('defaults', NoReverseMatch, [], {'arg2': 1}),
# Security tests
('security', '/%2Fexample.com/security/', ['/example.com'], {}),
)
class NoURLPatternsTests(TestCase):