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
d8e2be45
Unverified
Kaydet (Commit)
d8e2be45
authored
Agu 03, 2018
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Agu 03, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29627 -- Fixed QueryDict.urlencode() crash with non-string values.
Regression in
7d96f0c4
.
üst
2e3ba9f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
request.py
django/http/request.py
+1
-1
2.1.1.txt
docs/releases/2.1.1.txt
+3
-0
tests.py
tests/httpwrappers/tests.py
+7
-0
No files found.
django/http/request.py
Dosyayı görüntüle @
d8e2be45
...
@@ -511,7 +511,7 @@ class QueryDict(MultiValueDict):
...
@@ -511,7 +511,7 @@ class QueryDict(MultiValueDict):
return
urlencode
({
k
:
v
})
return
urlencode
({
k
:
v
})
for
k
,
list_
in
self
.
lists
():
for
k
,
list_
in
self
.
lists
():
output
.
extend
(
output
.
extend
(
encode
(
k
.
encode
(
self
.
encoding
),
v
.
encode
(
self
.
encoding
))
encode
(
k
.
encode
(
self
.
encoding
),
str
(
v
)
.
encode
(
self
.
encoding
))
for
v
in
list_
for
v
in
list_
)
)
return
'&'
.
join
(
output
)
return
'&'
.
join
(
output
)
...
...
docs/releases/2.1.1.txt
Dosyayı görüntüle @
d8e2be45
...
@@ -11,3 +11,6 @@ Bugfixes
...
@@ -11,3 +11,6 @@ Bugfixes
* Fixed a race condition in ``QuerySet.update_or_create()`` that could result
* Fixed a race condition in ``QuerySet.update_or_create()`` that could result
in data loss (:ticket:`29499`).
in data loss (:ticket:`29499`).
* Fixed a regression where ``QueryDict.urlencode()`` crashed if the dictionary
contains a non-string value (:ticket:`29627`).
tests/httpwrappers/tests.py
Dosyayı görüntüle @
d8e2be45
...
@@ -114,6 +114,13 @@ class QueryDictTests(SimpleTestCase):
...
@@ -114,6 +114,13 @@ class QueryDictTests(SimpleTestCase):
self
.
assertEqual
(
q
.
urlencode
(),
'next=
%2
Ft
%
C3
%
ABst
%26
key
%2
F'
)
self
.
assertEqual
(
q
.
urlencode
(),
'next=
%2
Ft
%
C3
%
ABst
%26
key
%2
F'
)
self
.
assertEqual
(
q
.
urlencode
(
safe
=
'/'
),
'next=/t
%
C3
%
ABst
%26
key/'
)
self
.
assertEqual
(
q
.
urlencode
(
safe
=
'/'
),
'next=/t
%
C3
%
ABst
%26
key/'
)
def
test_urlencode_int
(
self
):
# Normally QueryDict doesn't contain non-string values but lazily
# written tests may make that mistake.
q
=
QueryDict
(
mutable
=
True
)
q
[
'a'
]
=
1
self
.
assertEqual
(
q
.
urlencode
(),
'a=1'
)
def
test_mutable_copy
(
self
):
def
test_mutable_copy
(
self
):
"""A copy of a QueryDict is mutable."""
"""A copy of a QueryDict is mutable."""
q
=
QueryDict
()
.
copy
()
q
=
QueryDict
()
.
copy
()
...
...
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