Attachment 'recovery_token.patch'

Download

   1 diff -r 63016f784d88 MoinMoin/config/multiconfig.py
   2 --- a/MoinMoin/config/multiconfig.py	Mon Apr 05 23:37:52 2010 +0200
   3 +++ b/MoinMoin/config/multiconfig.py	Wed Apr 07 11:19:40 2010 +0200
   4 @@ -790,6 +790,8 @@
   5      ('password_checker', DefaultExpression('_default_password_checker'),
   6       'checks whether a password is acceptable (default check is length >= 6, at least 4 different chars, no keyboard sequence, not username used somehow (you can switch this off by using `None`)'),
   7  
   8 +    ('recovery_token_lifetime', 12, 'time in hours a recovery token is valid.'),
   9 +
  10    )),
  11    # ==========================================================================
  12    'spam_leech_dos': ('Anti-Spam/Leech/DOS',
  13 diff -r 63016f784d88 MoinMoin/user.py
  14 --- a/MoinMoin/user.py	Mon Apr 05 23:37:52 2010 +0200
  15 +++ b/MoinMoin/user.py	Wed Apr 07 11:19:40 2010 +0200
  16 @@ -990,7 +990,7 @@
  17          except ValueError:
  18              return False
  19          # only allow it to be valid for twelve hours
  20 -        if stamp + 12*60*60 < time.time():
  21 +        if stamp + int(self._cfg.recovery_token_lifetime)*60*60 < time.time():
  22              return False
  23          # check hmac
  24          # key must be of type string

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-04-07 09:21:03, 1.2 KB) [[attachment:recovery_token.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.