Several fixes for mitration from 2.2.1

This commit is contained in:
Adolfo Gómez García 2020-06-03 13:49:19 +02:00
parent 72efd559c4
commit 7b623bd986
3 changed files with 7 additions and 1 deletions

View File

@ -132,6 +132,7 @@ class CryptoManager:
try:
atfork()
decrypted = self._oldRsa.decrypt(encoders.decode(value, 'base64'))
return decrypted.decode()
except Exception:
logger.exception('Decripting: %s', value)
# logger.error(inspect.stack())

View File

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Allow old serialized autoattributes to load correctly (register path...)
from .auto_attributes import *

View File

@ -86,7 +86,7 @@ def udsJs(request: 'HttpRequest') -> str:
authenticators = [Authenticator.objects.get(small_name=auth_host)]
except Exception:
try:
authenticators = [Authenticator.objects.order_by('priority')[0].small_name]
authenticators = [Authenticator.objects.order_by('priority')[0]]
except Exception: # There is no authenticators yet...
authenticators = []
else: