Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fab7d338
authored
2022-05-11 15:44:23 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/pentest'
2 parents
bde59c0a
0677013d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
src/apps/account/views.py
src/apps/account/views.py
View file @
fab7d33
...
...
@@ -26,7 +26,7 @@ class LoginView(ObtainJSONWebToken, GenericView):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
# 登录次数限制
remote_ip
=
request
.
META
.
get
(
'HTTP_
REMOTE
IP'
,
''
)
remote_ip
=
request
.
META
.
get
(
'HTTP_
X_REAL_
IP'
,
''
)
user_name
=
request
.
data
.
get
(
'username'
,
''
)
times
=
rh
.
get_login_times
(
remote_ip
)
if
isinstance
(
times
,
int
)
and
times
>=
LOGIN_TIMES_LIMIT
:
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment