|
@@ -37,6 +37,7 @@ from Service.CommonService import CommonService
|
|
from Service.ModelService import ModelService
|
|
from Service.ModelService import ModelService
|
|
from Service.TemplateService import TemplateService
|
|
from Service.TemplateService import TemplateService
|
|
from django.views.generic import View
|
|
from django.views.generic import View
|
|
|
|
+import base64
|
|
|
|
|
|
|
|
|
|
# 获取验证码
|
|
# 获取验证码
|
|
@@ -1189,6 +1190,19 @@ class v2LoginView(TemplateView):
|
|
return response.json(111)
|
|
return response.json(111)
|
|
username = username.strip()
|
|
username = username.strip()
|
|
password = password.strip()
|
|
password = password.strip()
|
|
|
|
+ # 解密
|
|
|
|
+ for i in range(1, 4):
|
|
|
|
+ if i == 1:
|
|
|
|
+ # 第一次先解密
|
|
|
|
+ password = base64.b64decode(password)
|
|
|
|
+ password = password.decode('utf-8')
|
|
|
|
+ # 去盐值
|
|
|
|
+ password = password.split('SALTP@SSWORD')[1]
|
|
|
|
+ print("解密去盐后的password:%s" % password)
|
|
|
|
+ else:
|
|
|
|
+ # 继续解密
|
|
|
|
+ password = base64.b64decode(password)
|
|
|
|
+ password = password.decode('utf-8')
|
|
data_valid = DataValid()
|
|
data_valid = DataValid()
|
|
if data_valid.email_validate(username):
|
|
if data_valid.email_validate(username):
|
|
return self.do_email_login(username, password, response)
|
|
return self.do_email_login(username, password, response)
|