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 5be791f2
authored
Jan 09, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: Enhance CSRFWidget with debug logging for token session and received values
1 parent
bfaba81c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
opensipkd/base/widgets/widget_os.py
opensipkd/base/widgets/widget_os.py
View file @
5be791f
...
...
@@ -995,13 +995,18 @@ class CSRFWidget(widget.HiddenWidget):
if
not
cstruct
:
cstruct
=
new_csrf_token
(
request
)
values
=
self
.
get_template_values
(
field
,
cstruct
,
kw
)
_logging
.
debug
(
"CSRF Token session:
%
s"
,
cstruct
)
return
field
.
renderer
(
self
.
template
,
**
values
)
def
deserialize
(
self
,
field
,
pstruct
):
request
=
field
.
parent
.
schema
.
request
cstruct
=
get_csrf_token
(
request
)
if
pstruct
is
null
:
return
null
elif
not
isinstance
(
pstruct
,
string_types
):
raise
Invalid
(
field
.
schema
,
"Pstruct is not a string"
)
if
not
pstruct
:
return
null
_logging
.
debug
(
"CSRF Token received:
%
s"
,
pstruct
)
_logging
.
debug
(
"CSRF Token session:
%
s"
,
cstruct
)
return
pstruct
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