1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Adding "full" support to authenticators for unicode (a "must have been done before")

This commit is contained in:
Adolfo Gómez 2014-06-02 03:42:57 +00:00
parent 4b5f21b30e
commit 25f97a4b88
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ from uds.models import User
import logging
__updated__ = '2014-05-29'
__updated__ = '2014-06-02'
logger = logging.getLogger(__name__)
authLogger = logging.getLogger('authLog')
@ -273,7 +273,7 @@ def webLogin(request, response, user, password):
user.updateLastAccess()
request.session.clear()
request.session[USER_KEY] = user.id
request.session[PASS_KEY] = CryptoManager.manager().xor(password.encode('utf-8'), cookie)
request.session[PASS_KEY] = CryptoManager.manager().xor(password, cookie)
# Ensures that this user will have access througt REST api if logged in through web interface
REST.Handler.storeSessionAuthdata(request.session, manager_id, user.name, get_language(), user.is_admin, user.staff_member)
return True

View File

@ -46,11 +46,11 @@ class Cache(object):
CODEC = 'base64' # Can be zip, hez, bzip, base64, uuencoded
def __init__(self, owner):
self._owner = owner
self._owner = owner.encode('utf-8')
def __getKey(self, key):
h = hashlib.md5()
h.update(self._owner + key)
h.update(self._owner + key.encode('utf-8'))
return h.hexdigest()
def get(self, skey, defValue=None):