Context
freenet/freenet-core#3254 adds iframe sandbox isolation to the Freenet gateway. The gateway now handles auth token injection transparently via a postMessage bridge, so River no longer needs to read or pass the auth token itself.
What to remove
-
get_auth_token_from_window() in ui/src/components/app.rs (~line 222-243) — reads window.__FREENET_AUTH_TOKEN__ which is no longer injected. Now always returns None.
-
Manual authToken URL parameter appending in ui/src/components/app/freenet_api/connection_manager.rs (~line 42-55) — the gateway bridge injects the token automatically. This code path is now a no-op since the token is always None.
-
localStorage usage for invitations, notifications, and migration flags — sandboxed iframes have an opaque origin with no localStorage access. These should migrate to Freenet delegates or be removed if no longer needed.
-
BroadcastChannel multi-tab detection — won't work across opaque origins. Consider whether this feature is still needed or can use an alternative mechanism.
When
After freenet-core 0.1.149+ (with the sandbox fix) is deployed and confirmed working.
Related
[AI-assisted - Claude]
Context
freenet/freenet-core#3254 adds iframe sandbox isolation to the Freenet gateway. The gateway now handles auth token injection transparently via a postMessage bridge, so River no longer needs to read or pass the auth token itself.
What to remove
get_auth_token_from_window()inui/src/components/app.rs(~line 222-243) — readswindow.__FREENET_AUTH_TOKEN__which is no longer injected. Now always returnsNone.Manual
authTokenURL parameter appending inui/src/components/app/freenet_api/connection_manager.rs(~line 42-55) — the gateway bridge injects the token automatically. This code path is now a no-op since the token is alwaysNone.localStorageusage for invitations, notifications, and migration flags — sandboxed iframes have an opaque origin with nolocalStorageaccess. These should migrate to Freenet delegates or be removed if no longer needed.BroadcastChannelmulti-tab detection — won't work across opaque origins. Consider whether this feature is still needed or can use an alternative mechanism.When
After freenet-core 0.1.149+ (with the sandbox fix) is deployed and confirmed working.
Related
[AI-assisted - Claude]