Skip to content

Commit

Permalink
Remove quotes from cookie value in OAuthStateUtils
Browse files Browse the repository at this point in the history
Refer to #1647
  • Loading branch information
memben authored Feb 1, 2025
1 parent c77b863 commit 2479532
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slack_sdk/oauth/state_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def is_valid_browser(
for cookie in cookies:
values = cookie.split(";")
for value in values:
if value.strip() == f"{self.cookie_name}={state}":
# handle quoted cookie values (e.g. due to base64 encoding)
if value.strip().replace('"', "").replace("'", "") == f"{self.cookie_name}={state}":
return True
return False

0 comments on commit 2479532

Please sign in to comment.