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