@everystack/server 0.4.36 → 0.4.37

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@everystack/server` are documented here.
4
4
 
5
5
  Format based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [0.4.37] - 2026-10-18
8
+
9
+ ### Fixed
10
+
11
+ - an action named __proto__ in a plugin or app action map is refused at init
12
+
7
13
  ## [0.4.36] - 2026-10-18
8
14
 
9
15
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/server",
3
- "version": "0.4.36",
3
+ "version": "0.4.37",
4
4
  "description": "Server runtime primitives for Lambda — event adapters, routing, SSR, image processing",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -192,8 +192,8 @@
192
192
  "sst": "4.13.1",
193
193
  "ts-jest": "29.4.9",
194
194
  "typescript": "5.9.3",
195
- "@everystack/cli": "0.4.100",
196
- "@everystack/auth": "0.4.9"
195
+ "@everystack/auth": "0.4.9",
196
+ "@everystack/cli": "0.4.100"
197
197
  },
198
198
  "scripts": {
199
199
  "test": "jest",
package/src/plugin.ts CHANGED
@@ -172,6 +172,17 @@ export function createPluginLambdaHandler(
172
172
  contributions.push(await plugin(ctx));
173
173
  }
174
174
 
175
+ // An OWN `__proto__` key (parsed JSON, a computed key) cannot be an action: Object.assign would
176
+ // run the `__proto__` setter on the map instead of adding it, and the spread below would define
177
+ // it as an own key. Refuse it at init rather than drop or dispatch it.
178
+ const refuseProtoKey = (source: string, actions: Record<string, ActionHandler> | undefined) => {
179
+ if (actions && Object.hasOwn(actions, '__proto__')) {
180
+ throw new Error(`[everystack/server] ${source} action name "__proto__" is not allowed`);
181
+ }
182
+ };
183
+ for (const contribution of contributions) refuseProtoKey('plugin', contribution.actions);
184
+ refuseProtoKey('app', options.actions);
185
+
175
186
  // Collect actions (app-level takes precedence on collision)
176
187
  const pluginActions: Record<string, ActionHandler> = {};
177
188
  for (const contribution of contributions) {