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

Backport of Bug Fix: Surface Error for when cookie settings prevent localStorage into release/1.13.x #21664

Conversation

hc-github-team-secure-vault-core
Copy link
Contributor

Backport

This PR is auto-generated from #21503 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


The new Dismiss License Banner feature uses localStorage. Because the banners are loaded before a user attempts to login, the app was silently failing if a browsers settings did not permit localStorage.

To reproduce:

  1. Under your browsers privacy settings select "block all cookies".
    image
  2. Load the app.

Before the Dismiss license banners work we caught this error on login and surfaced it in the Login container. While the app still didn't work, it didn't silently fail on first load.

This fix shows the DomException error thrown and appends a small clarifying message afterwards. I didn't want to add a lot of custom logic to the error.hbs template for this one scenario, so it's pretty simple.

Note the error that is thrown is readOnly. Here are the MDN docs on the three params returned.

image


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-17601/check-local-storage-supported/informally-charmed-crappie branch from 39752b8 to 98453e8 Compare July 7, 2023 16:21
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-17601/check-local-storage-supported/informally-charmed-crappie branch from 5393a61 to 9883c5f Compare July 7, 2023 16:21
@Monkeychip Monkeychip added this to the 1.13.5 milestone Jul 7, 2023
@Monkeychip Monkeychip added ui bug Used to indicate a potential bug labels Jul 7, 2023
@Monkeychip Monkeychip enabled auto-merge (squash) July 7, 2023 16:55
@Monkeychip Monkeychip disabled auto-merge July 7, 2023 18:20
@VioletHynes VioletHynes added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jul 7, 2023
…l-storage-supported/informally-charmed-crappie
…l-storage-supported/informally-charmed-crappie
…l-storage-supported/informally-charmed-crappie
@Monkeychip Monkeychip enabled auto-merge (squash) July 10, 2023 19:15
@Monkeychip Monkeychip merged commit 7709549 into release/1.13.x Jul 10, 2023
51 checks passed
@Monkeychip Monkeychip deleted the backport/ui/VAULT-17601/check-local-storage-supported/informally-charmed-crappie branch July 10, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants