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

Don't crash if we can't use localStorage #1710

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Don't crash if we can't use localStorage #1710

merged 1 commit into from
Jul 18, 2023

Conversation

samhed
Copy link
Member

@samhed samhed commented Nov 2, 2022

Our settings are not a fatal requirement, we can fall back on the default values if they can't be accessed. A scenario where we've seen this happen is when cookies are disabled in the browser. It seems localStorage is disabled along with cookies in these settings.

Fixes issue #1577.

@samhed samhed added this to the v1.4.0 milestone Nov 2, 2022
@samhed samhed linked an issue Nov 2, 2022 that may be closed by this pull request
app/webutil.js Outdated Show resolved Hide resolved
@samhed samhed modified the milestones: v1.4.0, v1.5.0 Mar 24, 2023
@farrukh-taqveem
Copy link

Can we merge this ?

@samhed samhed marked this pull request as draft May 22, 2023 12:05
@samhed
Copy link
Member Author

samhed commented May 22, 2023

Yeah, I'll just rework it a bit according to @CendioOssman's comment

@samhed samhed marked this pull request as ready for review July 13, 2023 11:36
Our settings are not a fatal requirement, we can fall back on the
default values if they can't be accessed. A scenario where we've seen
this happen is when cookies are disabled in the browser. It seems
localStorage is disabled along with cookies in these settings.

So, lets log a message about the failure and otherwise silently
continue in this case.

Fixes issue #1577.
@samhed
Copy link
Member Author

samhed commented Jul 13, 2023

Added some simple unit tests as well.

@samhed samhed merged commit 295004c into master Jul 18, 2023
22 checks passed
@samhed samhed deleted the localStorage branch July 18, 2023 07:42
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.

vnc.html crashes if cookies are blocked
3 participants