Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Load ClouderyViewSwitch's WebViews sequentially #985

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Oct 18, 2023

In previous implementation, both Signing and Login WebViews were loaded in parallel

When doing this, there was a race condition on the Cloudery that would create two new sessions in parallel and so two different cookies instead on a single one

Later in the process, this would occasionally produce some CSRF issues due two the co-existence of two cookies, resulting in a 422 error from the Cloudery

To prevent that, we want both WebViews to be loaded sequentially to ensure only the first WebView will create a new session on Cloudery

This should be a bit slower, but this is acceptable

In previous implementation, both Signing and Login WebViews were loaded
in parallel

When doing this, there was a race condition on the Cloudery that would
create two new sessions in parallel and so two different cookies
instead on a single one

Later in the process, this would occasionally produce some CSRF issues
due two the co-existence of two cookies, resulting in a 422 error from
the Cloudery

To prevent that, we want both WebViews to be loaded sequentially to
ensure only the first WebView will create a new session on Cloudery

This should be a bit slower, but this is acceptable
@Ldoppea Ldoppea merged commit b3de73d into master Oct 19, 2023
1 check passed
@Ldoppea Ldoppea deleted the fix/csrf_race_condition branch October 19, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants