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
0edff210
Kaydet (Commit)
0edff210
authored
Eki 12, 2017
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Eki 12, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #28248 -- Clarified the precision of PASSWORD_RESET_TIMEOUT_DAYS.
üst
f90be0a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
tokens.py
django/contrib/auth/tokens.py
+5
-1
settings.txt
docs/ref/settings.txt
+4
-2
No files found.
django/contrib/auth/tokens.py
Dosyayı görüntüle @
0edff210
...
...
@@ -41,7 +41,11 @@ class PasswordResetTokenGenerator:
if
not
constant_time_compare
(
self
.
_make_token_with_timestamp
(
user
,
ts
),
token
):
return
False
# Check the timestamp is within limit
# Check the timestamp is within limit. Timestamps are rounded to
# midnight (server time) providing a resolution of only 1 day. If a
# link is generated 5 minutes before midnight and used 6 minutes later,
# that counts as 1 day. Therefore, PASSWORD_RESET_TIMEOUT_DAYS = 1 means
# "at least 1 day, could be up to 2."
if
(
self
.
_num_days
(
self
.
_today
())
-
ts
)
>
settings
.
PASSWORD_RESET_TIMEOUT_DAYS
:
return
False
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
0edff210
...
...
@@ -2807,8 +2807,10 @@ the URL in two places (``settings`` and URLconf).
Default: ``3``
The number of days a password reset link is valid for. Used by the
:mod:`django.contrib.auth` password reset mechanism.
The minimum number of days a password reset link is valid for. Depending on
when the link is generated, it will be valid for up to a day longer.
Used by the :class:`~django.contrib.auth.views.PasswordResetConfirmView`.
.. setting:: PASSWORD_HASHERS
...
...
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