Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
ff0a5aff
Kaydet (Commit)
ff0a5aff
authored
Agu 11, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27046 -- Supported IPv6-formatted IPv4 addresses in host validation.
Thanks LaMont Jones for the report and patch.
üst
4c2a6fe7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
request.py
django/http/request.py
+1
-1
tests.py
tests/requests/tests.py
+2
-1
No files found.
django/http/request.py
Dosyayı görüntüle @
ff0a5aff
...
...
@@ -24,7 +24,7 @@ from django.utils.six.moves.urllib.parse import (
)
RAISE_ERROR
=
object
()
host_validation_re
=
re
.
compile
(
r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$"
)
host_validation_re
=
re
.
compile
(
r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9
\.
:]+\])(:\d+)?$"
)
class
UnreadablePostError
(
IOError
):
...
...
tests/requests/tests.py
Dosyayı görüntüle @
ff0a5aff
...
...
@@ -589,7 +589,7 @@ class HostValidationTests(SimpleTestCase):
ALLOWED_HOSTS
=
[
'forward.com'
,
'example.com'
,
'internal.com'
,
'12.34.56.78'
,
'[2001:19f0:feee::dead:beef:cafe]'
,
'xn--4ca9at.com'
,
'.multitenant.com'
,
'INSENSITIVE.com'
,
'.multitenant.com'
,
'INSENSITIVE.com'
,
'[::ffff:169.254.169.254]'
,
])
def
test_http_get_host
(
self
):
# Check if X_FORWARDED_HOST is provided.
...
...
@@ -641,6 +641,7 @@ class HostValidationTests(SimpleTestCase):
'insensitive.com'
,
'example.com.'
,
'example.com.:80'
,
'[::ffff:169.254.169.254]'
,
]
for
host
in
legit_hosts
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment