797a0668 by 周伟奇

Merge branch 'feature/pentest'

2 parents fab7d338 5af4cabd
...@@ -29,7 +29,7 @@ class LoginView(ObtainJSONWebToken, GenericView): ...@@ -29,7 +29,7 @@ class LoginView(ObtainJSONWebToken, GenericView):
29 remote_ip = request.META.get('HTTP_X_REAL_IP', '') 29 remote_ip = request.META.get('HTTP_X_REAL_IP', '')
30 user_name = request.data.get('username', '') 30 user_name = request.data.get('username', '')
31 times = rh.get_login_times(remote_ip) 31 times = rh.get_login_times(remote_ip)
32 if isinstance(times, int) and times >= LOGIN_TIMES_LIMIT: 32 if isinstance(times, str) and int(times) >= LOGIN_TIMES_LIMIT:
33 raise self.invalid_params(msg="重试次数限制") 33 raise self.invalid_params(msg="重试次数限制")
34 34
35 res = super(LoginView, self).post(request, *args, **kwargs) 35 res = super(LoginView, self).post(request, *args, **kwargs)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!