ck %!s(int64=4) %!d(string=hai) anos
pai
achega
0a24e328a6
Modificáronse 1 ficheiros con 6 adicións e 6 borrados
  1. 6 6
      handlers/HandlerBase.py

+ 6 - 6
handlers/HandlerBase.py

@@ -110,12 +110,12 @@ class BaseHandler(RequestHandler,DateUtils):
             if not Authorization:
                 return False
             print(Authorization)
-            b = str(float(str(base64.b64decode(Authorization[::-1].encode('utf-8')),'utf-8'))*int(self.now.day))[:10]
-
-            # if (len(origStr) % 3 == 1):
-            #     origStr += "=="
-            # elif (len(origStr) % 3 == 2):
-            #     origStr += "="
+            origStr = Authorization[::-1]
+            if (len(origStr) % 3 == 1):
+                origStr += "=="
+            elif (len(origStr) % 3 == 2):
+                origStr += "="
+            b = str(float(str(base64.b64decode(origStr.encode('utf-8')), 'utf-8')) * int(self.now.day))[:10]
             diff =int(time.mktime(time.localtime()))-int(b)
             print(diff)
             if diff < 60: