-
Notifications
You must be signed in to change notification settings - Fork 142
Labels
[Plugin] Optimization DetectiveIssues for the Optimization Detective pluginIssues for the Optimization Detective plugin[Type] BugAn existing feature is brokenAn existing feature is broken
Milestone
Description
Bug Description
The detection script uses crypto.subtle.digest, but the crypto API is only available in secure (HTTPS) contexts.
I noticed by accident as I was accessing my local site without HTTPS.
Then I got a JS error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'digest')
While most sites are using HTTPS nowadays anyway, I think this potential error should be caught to avoid errors.
It can then log to the console that detection is not possible or so.
Steps to reproduce
- Install on HTTPS site
- View site
- See unhandled JS error
Screenshots
Additional Context
- PHP Version:
- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Plugin Version: [e.g. 22]
- Device: [e.g. iPhone6]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Plugin] Optimization DetectiveIssues for the Optimization Detective pluginIssues for the Optimization Detective plugin[Type] BugAn existing feature is brokenAn existing feature is broken
Type
Projects
Status
Done 😃