Skip to content

Conversation

IvanChalukov
Copy link
Contributor

Changes proposed by this PR

This PR addresses the issue where logging in through the browser UI via fly login would invalidate the existing browser session. The solution ensures that existing sessions remain active after the login process, preventing users from being logged out unexpectedly.

closes #8868

  • update parsing of csrf_token to Elm app

Notes to reviewer

The implementation enhances the process of sending the csrf_token to the Elm app, which then forwards the token to the web server. Previously, the value sent in the X-Csrf-Token header was enclosed in quotes, like this:

X-Csrf-Token: "redacted"

This caused an error when comparing the CSRF token from the cookie and the header in the web server.
After the change, the X-Csrf-Token header now looks like:

X-Csrf-Token: redacted

This adjustment ensures that the server can properly validate the token.

Release Note

  • Fix: Corrected CSRF token header format for proper validation.

@IvanChalukov IvanChalukov requested a review from a team as a code owner March 12, 2025 16:47
Signed-off-by: IvanChalukov <ichalukov@gmail.com>
@taylorsilva
Copy link
Member

This was next on my list of bugs to fix after v7.13.0 was out. Glad you beat me to it!

Copy link
Member

@taylorsilva taylorsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta love these one-liner changes.

I verified this resolves the issue. When I do fly login now, any other tabs I was logged into aren't suddenly logged out.

@taylorsilva taylorsilva merged commit 05fce13 into concourse:master Mar 12, 2025
12 checks passed
@IvanChalukov
Copy link
Contributor Author

I'm more than happy to help! I have to admit, that one was tricky!

@geofffranks
Copy link

@IvanChalukov you're my hero ❤️

☆。 ★。 ☆ ★
。☆ 。☆。☆
★。\|/。★
SUPERFAVE
★。/|\。★
。 ☆。☆。☆
☆。 ★。 ☆ ★

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fly login through browser UI will "invalidate" existing browser session
3 participants