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

STCOR-869 do not store /logout as a "return-to" URL #1511

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

zburke
Copy link
Member

@zburke zburke commented Jul 26, 2024

When a session ends due to timeout, the current location is stored in order to allow the subsequent session to begin where the previous one left off. If the "session timeout" event fires more than once, however, this could lead to the /logout location being stored as the "return to" location with obvious dire consequences.

There are two changes here:

  1. Don't allow locations beginning with /logout to be stored. This fixes the symptom, not the root cause, but is still worthwhile.

  2. Store the session-timeout interval ID in redux, and manage that timer via a redux action. Even though this still shouldn't fire more than once, if it does, this allows us to cancel the previous timer before adding the next one. This is an attempt to fix the root cause.

Replaces #1508. This is just a rebase of the same changes; squashing #1507 sorta borked #1508.

Refs STCOR-869

When a session ends due to timeout, the current location is stored in
order to allow the subsequent session to begin where the previous one
left off. If the "session timeout" event fires more than once,
however, this could lead to the `/logout` location being stored as the
"return to" location with obvious dire consequences.

There are two changes here:

1. Don't allow locations beginning with `/logout` to be stored. This
  fixes the symptom, not the root cause, but is still worthwhile.

2. Store the session-timeout interval ID in redux, and manage that timer
  via a redux action. Even though this _still_ shouldn't fire more than
  once, if it does, this allows us to cancel the previous timer before
  adding the next one. This is an attempt to fix the root cause.

Refs STCOR-869
Copy link

Jest Unit Test Statistics

240 tests  ±0   240 ✔️ ±0   51s ⏱️ -1s
  45 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit bf8bad9. ± Comparison against base commit 3c10177.

Copy link

BigTest Unit Test Statistics

    1 files  ±0      1 suites  ±0   10s ⏱️ ±0s
266 tests ±0  260 ✔️ ±0  6 💤 ±0  0 ±0 
269 runs  ±0  263 ✔️ ±0  6 💤 ±0  0 ±0 

Results for commit bf8bad9. ± Comparison against base commit 3c10177.

Copy link

sonarcloud bot commented Jul 26, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
27.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@zburke zburke merged commit 0095868 into keycloak-quesnelia Jul 26, 2024
5 of 6 checks passed
@zburke zburke deleted the STCOR-869-quesnelia branch July 26, 2024 17:50
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.

1 participant