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

Ensure credentials are not left in form after disconnect #1968

Merged
merged 1 commit into from
May 23, 2024

Conversation

nnecla
Copy link
Contributor

@nnecla nnecla commented May 22, 2024

This pull request is to reset the credentials stored in the application memory on disconnect from server.

@nnecla nnecla requested a review from a team May 22, 2024 10:36
@nnecla nnecla self-assigned this May 22, 2024
@@ -652,6 +656,7 @@ export const disconnectEpic = (action$: any, store: any) => {
.merge(action$.ofType(USER_CLEAR))
.do(() => bolt.closeConnection())
.do(() => store.dispatch(resetUseDb()))
.do(() => resetMemoryCredentials())
Copy link
Contributor

Choose a reason for hiding this comment

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

If the user has the setting enabled to store credentials in localstorage, I think it would be fine to not clear the password in memory for convenience. At the same time though, I think it's reasonable if you've run :server disconnect (automatically from the connection dropping or manually) to expect the password to no longer be stored (when I tried it out it's cleared both in memory and localstorage after a :server disconnect)

I think it'd be good to ask Greg / PM how he wants it to work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I've seen, for the enabled localStorage credentials case, it really does not matter if we reset the memory credentials or not as it uses the data from the localStorage anyways to fill the connection form, if it exists.

We can of course prevent password to be removed if the setting is enabled both for the memory and for the localStorage, but this is different than the current prod experience. Let me check with Greg on this one as you've mentioned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked with Greg, and as in the feature enabled case it clears the password from the local storage on disconnect, we will be also clearing the password from the application memory, same as the not enabled case.

@nnecla nnecla force-pushed the reset-memory-credentials-on-disconnect branch from dc17477 to 23804d8 Compare May 22, 2024 15:44
@nnecla nnecla merged commit 514f530 into master May 23, 2024
16 checks passed
@nnecla nnecla deleted the reset-memory-credentials-on-disconnect branch May 23, 2024 08:45
@OskarDamkjaer OskarDamkjaer changed the title resetting memory credentials after disconnect Ensure credentials are not left in form after disconnect Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants