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

Improve error message in decrypt template when crypto.subtle is missing #51

Open
Greenheart opened this issue May 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Greenheart
Copy link
Owner

Greenheart commented May 26, 2024

The current message only refers to using a "modern browser".

error('Please use a modern browser.')

However, since this error also appears in insecure browser contexts (http, file), it would be more useful to have an error message stating that the crypto is unavailable.

We could check if the page is viewed in an insecure context, and adapt the message based on that. For example we could check window.isSecureContext and then link to https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts

@Greenheart Greenheart added the enhancement New feature or request label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant