Replies: 1 comment
|
I still get the same error even from your branch. But then again I'm trying to access it from another machine. I really don't like being gatekept from running this on my local lan openly and only on 127..0.0.1. I modified packages/bundle//web-app/src/startup.ts and removed the check for --host 0.0.0.0 but I think there likely needs to be more done. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the Web UI is served over plain HTTP on a LAN/VPN address (e.g.
http://10.0.0.2:3080via WireGuard, using--trusted-host), any code path that callscrypto.randomUUID()crashes with:First visible symptom: Settings → 模型 (Models) fails to load the provider catalog with the above error.
Root cause
crypto.randomUUID()is only exposed in secure contexts (HTTPS, orlocalhost/127.0.0.1). Plain-HTTP access via a LAN IP is an insecure context, so the function isundefined— whilecrypto.getRandomValues()remains available there.Local access via
http://127.0.0.1:3080works because loopback counts as a secure context, which is likely why this went unnoticed.Why this is in scope
--trusted-hostexists precisely to bless non-loopback serving (LAN/VPN deployments), and the/apibrowser-trust fence explicitly accepts "deployment-derived LAN IP literals, or a declaredtrustedHostsauthority". So plain-HTTP remote serving is a supported deployment shape — the frontend just isn't robust in it yet.Reproduction
dsh web --trusted-host 10.0.0.2:3080(with any loopback relay bound to the LAN/VPN interface)http://10.0.0.2:3080(tested: iOS Safari over WireGuard)Suggested fix
Polyfill at the web entry, keeping the native implementation wherever it exists.
getRandomValuesdraws from the same CSPRNG, so randomness quality is unchanged:A ready branch implementing this (passes the repo's lefthook gates, incl.
noUncheckedIndexedAccesstypecheck): https://github.com/caozeal/deepseek-harness/tree/fix/web-randomuuid-insecure-contextI understand external PRs are not accepted at this stage — sharing the branch as a reference patch; happy to adjust the approach (e.g. a shared util instead of an entry-level polyfill) if the team prefers.
Environment
All reactions