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
593c9eb6
Kaydet (Commit)
593c9eb6
authored
Eyl 20, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Increased the default PBKDF2 iterations for the 1.10 release cycle.
üst
54848a96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
hashers.py
django/contrib/auth/hashers.py
+1
-1
1.10.txt
docs/releases/1.10.txt
+4
-1
test_hashers.py
tests/auth_tests/test_hashers.py
+3
-3
No files found.
django/contrib/auth/hashers.py
Dosyayı görüntüle @
593c9eb6
...
...
@@ -226,7 +226,7 @@ class PBKDF2PasswordHasher(BasePasswordHasher):
safely but you must rename the algorithm if you change SHA256.
"""
algorithm
=
"pbkdf2_sha256"
iterations
=
24
000
iterations
=
30
000
digest
=
hashlib
.
sha256
def
encode
(
self
,
password
,
salt
,
iterations
=
None
):
...
...
docs/releases/1.10.txt
Dosyayı görüntüle @
593c9eb6
...
...
@@ -42,7 +42,10 @@ Minor features
:mod:`django.contrib.auth`
^^^^^^^^^^^^^^^^^^^^^^^^^^
* ...
* The default iteration count for the PBKDF2 password hasher has been increased
by 25%. This backwards compatible change will not affect users who have
subclassed ``django.contrib.auth.hashers.PBKDF2PasswordHasher`` to change the
default value.
:mod:`django.contrib.contenttypes`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...
tests/auth_tests/test_hashers.py
Dosyayı görüntüle @
593c9eb6
...
...
@@ -48,7 +48,7 @@ class TestUtilsHashPass(SimpleTestCase):
def
test_pbkdf2
(
self
):
encoded
=
make_password
(
'lètmein'
,
'seasalt'
,
'pbkdf2_sha256'
)
self
.
assertEqual
(
encoded
,
'pbkdf2_sha256$
24000$seasalt$V9DfCAVoweeLwxC/L2mb+7swhzF0XYdyQMqmusZqiTc
='
)
'pbkdf2_sha256$
30000$seasalt$VrX+V8drCGo68wlvy6rfu8i1d1pfkdeXA4LJkRGJodY
='
)
self
.
assertTrue
(
is_password_usable
(
encoded
))
self
.
assertTrue
(
check_password
(
'lètmein'
,
encoded
))
self
.
assertFalse
(
check_password
(
'lètmeinz'
,
encoded
))
...
...
@@ -244,14 +244,14 @@ class TestUtilsHashPass(SimpleTestCase):
hasher
=
PBKDF2PasswordHasher
()
encoded
=
hasher
.
encode
(
'lètmein'
,
'seasalt2'
)
self
.
assertEqual
(
encoded
,
'pbkdf2_sha256$
24000$seasalt2$TUDkfilKHVC7BkaKSZgIKhm0aTtXlmcw/5C1FeS/DPk
='
)
'pbkdf2_sha256$
30000$seasalt2$a75qzbogeVhNFeMqhdgyyoqGKpIzYUo651sq57RERew
='
)
self
.
assertTrue
(
hasher
.
verify
(
'lètmein'
,
encoded
))
def
test_low_level_pbkdf2_sha1
(
self
):
hasher
=
PBKDF2SHA1PasswordHasher
()
encoded
=
hasher
.
encode
(
'lètmein'
,
'seasalt2'
)
self
.
assertEqual
(
encoded
,
'pbkdf2_sha1$
24000$seasalt2$L37ETdd9trqrsJDwapU3P+2Edhg
='
)
'pbkdf2_sha1$
30000$seasalt2$pMzU1zNPcydf6wjnJFbiVKwgULc
='
)
self
.
assertTrue
(
hasher
.
verify
(
'lètmein'
,
encoded
))
def
test_upgrade
(
self
):
...
...
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