Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Aug 7, 2024
1 parent 840e0d8 commit 8f59437
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions h/security/policy/_cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ def remember(self, request, userid, **kw): # pylint:disable=unused-argument
request.session.update(data)
request.session.new_csrf_token()

# We're about to add the response headers to set the API auth cookie.
# Set this attribute so that _issue_api_authcookie() below won't add
# the same headers again. Otherwise responses to login form submissions
# would set the same cookie twice.
#
# This line of code can be deleted, along with _issue_api_authcookie()
# itself, at least 30 days after it has been deployed to production.
request.h_api_authcookie_headers_added = True

return [
Expand Down

0 comments on commit 8f59437

Please sign in to comment.