Repository navigation
Conversation
Browsers now treat 127.0.0.1 as a secure context, so the shared local.jmw.nz certificate is no longer needed outside Safari. The plugin now serves the API on http://127.0.0.1:41080 (started before the certificate download) and keeps https://local.jmw.nz:41443 as a deprecated Safari fallback until Safari allows loopback requests, or November 2027 at the latest. The web client tries HTTP first and falls back to HTTPS, and the docs lead with HTTP. Also from the Marketplace security review: oversized HTTP requests and WebSocket frames or messages now drop the connection before NetCoreServer buffers them (one 200 MB frame previously grew Logi Plugin Service by ~790 MB), upgrades are limited to /ws, GET / no longer reports version or endpoint details, 500s no longer echo exception text, and the listing discloses that any website can trigger haptics. Version bumped to 1.3.
The site now presents plain HTTP on 127.0.0.1 as the only endpoint. The Safari HTTPS fallback is documented once, in a deprecated section at the end of the API page.
Deploying hapticwebplugin with
|
| Latest commit: |
2974e34
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4c08c836.hapticwebplugin.pages.dev |
| Branch Preview URL: | https://jmw-http-loopback-server.hapticwebplugin.pages.dev |
Sol review round 1. The guard now holds back frame headers split across reads (NetCoreServer restarts its header loops on a split and would misparse), counts control frames toward the message cap since NetCoreServer buffers them until FIN, and upgrade request bodies are no longer fed to the frame parser. The WebSocket client now falls back to the next endpoint when the socket itself fails, not only the health check, and ignores attempts superseded by disconnect(). The REST health probe times out after 3s, and the README port tip names the right port.
Sol review round 2. LocalServer refuses to start a listener once disposed, so a certificate download that finishes after unload no longer leaves port 41443 bound. The REST client re-probes after a non-OK response, a replaced WebSocket is closed and can no longer clear its successor, and the docs say Chrome and Firefox (not all browsers) allow HTTPS pages to call loopback directly.
Sol review round 3. A valid certificate in its 14-day renewal window now shows its own expiry warning, as before this branch, instead of 'HTTPS fallback is unavailable'.
Sol review round 4. Adopting a socket clears any retry scheduled meanwhile, and the README names the HTTPS fallback URL explicitly.
Sol review round 5. The REST probe uses AbortController instead of AbortSignal.timeout(), which Safari only has from 16, and the README's Safari troubleshooting step checks the HTTPS listener directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Response to the Logitech Marketplace security review (F1 and F2).
Why: Browsers now treat 127.0.0.1 as a secure context, so the shared local.jmw.nz certificate is only still needed for Safari. The plugin now serves on http://127.0.0.1:41080 and keeps https://local.jmw.nz:41443 as a deprecated Safari fallback, to be removed once Safari allows loopback requests or by November 2027. The web client tries HTTP first, and the docs and listing now say that any site can trigger haptics (Chrome prompts first).
Hardening: Oversized HTTP requests and WebSocket frames or messages now drop the connection before NetCoreServer buffers them. Previously one 200 MB frame grew Logi Plugin Service by about 790 MB. Upgrades are limited to /ws, GET / no longer reports version or endpoints, and 500s no longer echo exception text. Version bumped to 1.3.
Risk: The HTTP listener starts before the certificate download, so a certificate failure is now a warning rather than an error. Existing HTTPS integrations keep working unchanged.
Testing: Ran the new server code in a harness on spare ports against both listeners. Health checks, POST haptics and WebSocket haptics work, including a frame split into single bytes. Oversized frames, a 2 KB fragmented message and a 20 KB request each drop the connection, and memory stays flat (58 MB before and after). svelte-check and the web build pass. Not yet tested inside Logi Plugin Service or in Safari.