Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5d2c328e
authored
Dec 13, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add debug logging for referrer and CSRF token in ViewAuth login process
1 parent
f9ff5fc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
opensipkd/base/views/user_login.py
opensipkd/base/views/user_login.py
View file @
5d2c328
...
...
@@ -181,6 +181,7 @@ def oauth2_login(request, params=None):
class
ViewAuth
(
BaseView
):
def
view_login
(
self
):
request
=
self
.
req
log
.
debug
(
"Referrer:
%
s"
,
request
.
referrer
)
request
.
session
[
"login"
]
=
True
next_url
=
request
.
params
.
get
(
'next'
,
request
.
referrer
)
login_tpl
=
BASE_CLASS
.
login_tpl
...
...
@@ -302,14 +303,18 @@ class ViewAuth(BaseView):
# url=get_urls(request.route_url('login')),
# next_url=next_url,
# login=login, )
if
self
.
req
.
is_xhr
:
form
.
set_appstruct
({})
struct
=
form
.
cstruct
csrf_token
=
get_csrf_token
(
request
)
if
not
csrf_token
:
csrf_token
=
new_csrf_token
(
request
)
struct
[
"csrf_token"
]
=
csrf_token
log
.
debug
(
"CSRF Token:
%
s"
,
csrf_token
)
log
.
debug
(
"Form Struct:
%
s"
,
struct
)
return
self
.
resp_xhr
({
"data"
:
struct
})
# d = self.form2dict(form)
...
...
Write
Preview
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