diff MoinMoin/themes/__init__.py @ 174:e8f61cbd661b

modularize crypto/random stuff, move it to MoinMoin.util.crypto, pw change bugfix on password change, the new password was not saved to the profile User / crypto code: minor optimizations / refactorings crypto module contents: password hashing/encryption, validation, pw hash upgrades: * pw_hash = crypt_password(password) * is_valid = valid_password(password, pw_hash) * upgraded_pw_hash = upgrade_password(password, pw_hash) password recovery: * key, token = generate_token() * is_valid = valid_token(key, token) random strings: * rs = random_string(length, chars) compute ascii cache keys: * key = cache_key(**kw)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 07 Apr 2011 20:56:35 +0200
parents d3deda1731fb
children 661a57c747bd
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Wed Apr 06 16:46:54 2011 +0200
+++ b/MoinMoin/themes/__init__.py	Thu Apr 07 20:56:35 2011 +0200
@@ -22,6 +22,7 @@
 from MoinMoin import wikiutil, user
 from MoinMoin.config import USERID, ADDRESS, HOSTNAME
 from MoinMoin.util.interwiki import split_interwiki, resolve_interwiki, join_wiki, getInterwikiHome
+from MoinMoin.util.crypto import cache_key
 
 
 def get_current_theme():
@@ -220,7 +221,7 @@
             if sistername == self.cfg.interwikiname:  # it is THIS wiki
                 items.append(('sisterwiki current', sisterurl, sistername))
             else:
-                cid = wikiutil.cache_key(usage="SisterSites", sistername=sistername)
+                cid = cache_key(usage="SisterSites", sistername=sistername)
                 sisteritems = app.cache.get(cid)
                 if sisteritems is None:
                     uo = urllib.URLopener()