Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
2c1dacb9
"ts/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "dc54f4add0ea1837be0a14f353cf6bcf6e68bb95"
Commit
2c1dacb9
authored
Feb 01, 2024
by
Tim Farrell
Browse files
We should verify signatures to make the whole session secret meaningful.
parent
03a7e359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/utils/utils.py
backend/utils/utils.py
+1
-1
No files found.
backend/utils/utils.py
View file @
2c1dacb9
...
@@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st
...
@@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st
def
decode_token
(
token
:
str
)
->
Optional
[
dict
]:
def
decode_token
(
token
:
str
)
->
Optional
[
dict
]:
try
:
try
:
decoded
=
jwt
.
decode
(
token
,
SESSION_SECRET
,
options
=
{
"verify_signature"
:
False
}
)
decoded
=
jwt
.
decode
(
token
,
SESSION_SECRET
)
return
decoded
return
decoded
except
Exception
as
e
:
except
Exception
as
e
:
return
None
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment