Commit 8e78d5e5 authored by zhanglu's avatar zhanglu

Merge branch 'hotfix/bug01' into 'master'

修复问题

See merge request alpha/sun!5
parents b269fb75 aeda5238
......@@ -4,7 +4,7 @@
# Date: 2018/11/16
from django.conf import settings
from utils.base import APIView
from utils.user_util import make_password
from utils.user_util import make_password_own
from utils.logger import error_logger
......@@ -53,7 +53,7 @@ class AccountUpdateOrCreateView(APIView):
data = {
'username': request.POST.get('username'),
'email': request.POST.get('email'),
'password': make_password(request.POST.get('password')),
'password': make_password_own(request.POST.get('password')),
'phone': request.POST.get('phone'),
'nick_name': request.POST.get('nick_name'),
'is_staff': True,
......@@ -137,7 +137,7 @@ class LogoutView(APIView):
class ResetPasswordView(APIView):
def post(self, request):
id = request.POST.get('id')
password = make_password(settings.OPERATOR_PASSWORD)
password = make_password_own(settings.OPERATOR_PASSWORD)
try:
self.rpc['venus/sun/account/reset_password'](id=id, password=password).unwrap()
except Exception as e:
......
......@@ -41,7 +41,7 @@ def require_login(request, origin=''):
return login_require
def make_password(password):
def make_password_own(password):
"""生成密码hash
"""
return make_password(password, None, 'pbkdf2_sha256')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment