Skip to content

Commit 814180e

Browse files
committed
adding dev-v0.20.0 tag to this commit to ensure building
1 parent 1223944 commit 814180e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

html/supertokens_python/recipe/session/cookie_and_header.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
454454
# resulting in an infinite refresh loop. To fix this, users are asked to specify &#34;older_cookie_domain&#34; in
455455
# the config.
456456

457+
457458
# This function checks for multiple cookies with the same name and clears the cookies for the older domain.
458459
def clear_session_cookies_from_older_cookie_domain(
459460
request: BaseRequest, config: SessionConfig, user_context: Dict[str, Any]
@@ -491,9 +492,11 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
491492
get_cookie_name_from_token_type(token_type),
492493
&#34;&#34;,
493494
0,
494-
&#34;refresh_token_path&#34;
495-
if token_type == &#34;refresh&#34;
496-
else &#34;access_token_path&#34;,
495+
(
496+
&#34;refresh_token_path&#34;
497+
if token_type == &#34;refresh&#34;
498+
else &#34;access_token_path&#34;
499+
),
497500
request,
498501
domain=config.older_cookie_domain,
499502
)
@@ -526,7 +529,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.cookie_and_head
526529
for cookie_pair in cookie_pairs:
527530
name_value = cookie_pair.split(&#34;=&#34;)
528531
if len(name_value) != 2:
529-
raise Exception(&#34;Invalid cookie string in request header&#34;)
532+
continue
530533
name, value = unquote(name_value[0].strip()), unquote(name_value[1].strip())
531534
if name in cookies:
532535
cookies[name].append(value)
@@ -659,9 +662,11 @@ <h2 class="section-title" id="header-functions">Functions</h2>
659662
get_cookie_name_from_token_type(token_type),
660663
&#34;&#34;,
661664
0,
662-
&#34;refresh_token_path&#34;
663-
if token_type == &#34;refresh&#34;
664-
else &#34;access_token_path&#34;,
665+
(
666+
&#34;refresh_token_path&#34;
667+
if token_type == &#34;refresh&#34;
668+
else &#34;access_token_path&#34;
669+
),
665670
request,
666671
domain=config.older_cookie_domain,
667672
)

0 commit comments

Comments
 (0)