@zolomedia/bifrost-client 1.7.74 → 1.7.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bifrost_client.js +10 -2
- package/package.json +1 -1
package/bifrost_client.js
CHANGED
|
@@ -45,6 +45,15 @@
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// ─── core-import origin allowlist (SSOT) ────────────────────────────────────
|
|
49
|
+
// bifrost_core_url arrives over the WebSocket (attacker-influenceable), and the
|
|
50
|
+
// bootstrap import()s it — so the core may only load from a blessed origin.
|
|
51
|
+
// The page origin is always allowed (added at load time). Add new blessed CDNs
|
|
52
|
+
// HERE (this is the one place to edit). Outside self-hosters extend per-instance
|
|
53
|
+
// via opts.coreOriginAllowlist instead of forking.
|
|
54
|
+
// ⚠ Phase 2: when the client serves from js.zolo.media, add it to this list.
|
|
55
|
+
const DEFAULT_CORE_ORIGINS = ['https://cdn.jsdelivr.net'];
|
|
56
|
+
|
|
48
57
|
// ─── BifrostClient (bootstrap) ──────────────────────────────────────────────
|
|
49
58
|
|
|
50
59
|
class BifrostClient {
|
|
@@ -122,7 +131,7 @@
|
|
|
122
131
|
// would load attacker code into the page context.
|
|
123
132
|
const allowedOrigins = [
|
|
124
133
|
window.location.origin,
|
|
125
|
-
|
|
134
|
+
...DEFAULT_CORE_ORIGINS,
|
|
126
135
|
...(this._opts.coreOriginAllowlist || []),
|
|
127
136
|
];
|
|
128
137
|
const coreOrigin = new URL(coreUrl).origin;
|
|
@@ -145,7 +154,6 @@
|
|
|
145
154
|
// Instantiate BifrostCore — it reads zui-config itself, connects, sends execute_walker
|
|
146
155
|
const core = new mod.BifrostCore(this._url, {
|
|
147
156
|
autoConnect: true,
|
|
148
|
-
zTheme: false, // ztheme.js already loaded by zVaF.html
|
|
149
157
|
...this._opts,
|
|
150
158
|
});
|
|
151
159
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zolomedia/bifrost-client",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.75",
|
|
4
4
|
"description": "Browser client for zBifrost — the WebSocket bridge that turns JSON events from a zOS server into live DOM. Thin bootstrap + server-controlled core.",
|
|
5
5
|
"homepage": "https://github.com/ZoloAi/zbifrost-client#readme",
|
|
6
6
|
"repository": {
|