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-907 cautiously evaluate localforage data #1561

Merged
merged 3 commits into from
Nov 22, 2024
Merged

STCOR-907 cautiously evaluate localforage data #1561

merged 3 commits into from
Nov 22, 2024

Conversation

zburke
Copy link
Member

@zburke zburke commented Nov 14, 2024

Be thorough when evaluating data from localforage to determine whether a session exists by checking for user.id, tenant, and isAuthenticated values rather than accepting the existence of a (possibly empty, or mostly empty) object as proof of life. Without these more thorough checks, a sparsely-populated value may be passed to validateUser(), causing it to throw when evaluating user.id, and misleadingly dispatching a server-down message.

It is likely that a rogue RTR process is responsible for writing this garbled/sparse session data. We need to research that and resolve that problem too, but at least we have a handle on this from the other end.

Refs STCOR-907

Be thorough when evaluating data from localforage to determine whether a
session exists by checking for `user.id`, `tenant`, and
`isAuthenticated` values rather than accepting the existence of a
(possibly empty, or mostly empty) object as proof.

Without this check, a sparsely-populated value may be passed to
`validateUser()`, causing it to throw when evaluating `user.id`, and
misleadingly dispatching a server-down message.

It is likely that a rogue RTR process is responsible for writing this
garbled/sparse session data. We need to research that and resolve that
problem too, but at least we have a handle on this from the other end.

Refs STCOR-907
@zburke zburke requested review from JohnC-80 and a team November 14, 2024 22:10
Copy link

github-actions bot commented Nov 14, 2024

Jest Unit Test Statistics

184 tests  +6   184 ✔️ +6   35s ⏱️ -1s
  25 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit a56a82e. ± Comparison against base commit aed9571.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 14, 2024

BigTest Unit Test Statistics

    1 files  ±0      1 suites  ±0   10s ⏱️ -1s
267 tests ±0  261 ✔️ ±0  6 💤 ±0  0 ±0 
270 runs  ±0  264 ✔️ ±0  6 💤 ±0  0 ±0 

Results for commit a56a82e. ± Comparison against base commit aed9571.

♻️ This comment has been updated with latest results.

Copy link

sonarcloud bot commented Nov 22, 2024

@zburke zburke merged commit 494bfcd into b10.1 Nov 22, 2024
6 checks passed
@zburke zburke deleted the STCOR-907 branch November 22, 2024 12:49
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