Show More
@@ -20,6 +20,8 b' import os' | |||||
20 | import re |
|
20 | import re | |
21 | import time |
|
21 | import time | |
22 | import datetime |
|
22 | import datetime | |
|
23 | ||||
|
24 | import binascii | |||
23 | import dateutil |
|
25 | import dateutil | |
24 | import dateutil.relativedelta |
|
26 | import dateutil.relativedelta | |
25 | import pickle |
|
27 | import pickle | |
@@ -225,11 +227,13 b' class RedisAuthSessions(BaseAuthSessions' | |||||
225 | data = client.get(key) |
|
227 | data = client.get(key) | |
226 | if data: |
|
228 | if data: | |
227 | accessed_time = 0 |
|
229 | accessed_time = 0 | |
228 | data = base64.b64decode(data) |
|
|||
229 |
|
230 | |||
230 | try: |
|
231 | try: | |
|
232 | data = base64.b64decode(data) | |||
231 | json_data = pickle.loads(data) |
|
233 | json_data = pickle.loads(data) | |
232 | accessed_time = json_data['_accessed_time'] |
|
234 | accessed_time = json_data['_accessed_time'] | |
|
235 | except binascii.Error: | |||
|
236 | accessed_time = 0 | |||
233 | except pickle.UnpicklingError: |
|
237 | except pickle.UnpicklingError: | |
234 | accessed_time = 0 |
|
238 | accessed_time = 0 | |
235 | except KeyError: |
|
239 | except KeyError: |
General Comments 0
You need to be logged in to leave comments.
Login now