summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTomáš Ehrlich <tomas.ehrlich@gmail.com>2013-07-03 08:13:38 +0200
committerTim Graham <timograham@gmail.com>2013-07-03 10:36:21 -0400
commitc5bc98d7e1779263dc870843cab296f052e9a318 (patch)
tree28ba912dcfcedc7bfd80656f92bcd24abe974719 /django
parent63b2155919c017591e70782fb0ad92167a160f30 (diff)
Fixed #20687 -- Added documentation for django.core.signing API.
Thanks Baptiste Mispelon for the suggestion.
Diffstat (limited to 'django')
-rw-r--r--django/core/signing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/core/signing.py b/django/core/signing.py
index bbe53aafe3..c3b2c3ed36 100644
--- a/django/core/signing.py
+++ b/django/core/signing.py
@@ -183,6 +183,10 @@ class TimestampSigner(Signer):
return super(TimestampSigner, self).sign(value)
def unsign(self, value, max_age=None):
+ """
+ Retrieve original value and check it wasn't signed more
+ than max_age seconds ago.
+ """
result = super(TimestampSigner, self).unsign(value)
value, timestamp = result.rsplit(self.sep, 1)
timestamp = baseconv.base62.decode(timestamp)