@fuzdev/fuz_app 0.172.0 → 0.173.0
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/dist/actions/CLAUDE.md +1 -1
- package/dist/actions/perform_action.d.ts +4 -3
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +21 -16
- package/dist/http/CLAUDE.md +3 -3
- package/dist/http/error_schemas.d.ts +8 -1
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +8 -1
- package/dist/http/json_text.d.ts +4 -0
- package/dist/http/json_text.d.ts.map +1 -1
- package/dist/http/json_text.js +4 -0
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +8 -2
- package/dist/http/schema_helpers.d.ts +21 -7
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +31 -13
- package/dist/testing/cross_backend/origin_conformance.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin_conformance.js +15 -2
- package/dist/ui/AppShell.svelte +1 -1
- package/dist/ui/PopoverButton.svelte +1 -1
- package/dist/ui/popover.svelte.d.ts +1 -1
- package/dist/ui/popover.svelte.js +1 -1
- package/package.json +8 -4
package/dist/actions/CLAUDE.md
CHANGED
|
@@ -292,7 +292,7 @@ Pipeline (401 → authz → 403 → 429 → 400 → handler):
|
|
|
292
292
|
2. Authorization phase — `apply_authorization_phase` against `account_id` + `read_acting(auth, raw_params)`, which takes the selector off the raw params (malformed reads as omitted) since validation runs later. Test escape hatch via `preset.request_context`
|
|
293
293
|
3. Post-authorization auth (403) — credential-type gate, then token scope, then role
|
|
294
294
|
4. Rate limit (429) — throttle-requests semantics, ahead of validation so malformed params charge the budget and a throttled caller pays no schema work
|
|
295
|
-
5. Validate params (400) — first, object params
|
|
295
|
+
5. Validate params (400) — first, one walk of object params (`scan_json_value` in `http/schema_helpers.ts`, iterative) refuses, on every input, an own `__proto__` key at any depth with `data.reason` `params_proto_key` (`ERROR_PARAMS_PROTO_KEY`), then U+0000 in any string or key with `params_nul` (`ERROR_PARAMS_NUL` — Postgres refuses it in `text` and `jsonb`); the Rust twin walks after its params-shape check, so a non-object `params` stays the schema's reasonless refusal; then `spec.input` parses them (`parse`) with void / `?? {}` rules; a void input (`is_void_schema`: `s.void`) reads absent, `null` (GET `?params=null`), and `{}` alike as the no-arg call (`to_input_params` in `http/schema_helpers.ts`, via `to_void_params`, the twin of the Rust `require_void_params`; the peer receive path in `ActionDispatcher` runs the same normalizer) and refuses any other shape. A refusal is `to_invalid_params_error`: the generic `invalid params`, `data.reason` when the first issue's field declares an `invalid_reason` in its `meta` and no issue sits on the input itself, such as an unknown key (`resolve_issues_invalid_reason`, `schema_meta.ts` — see ../../../docs/architecture.md §Error Schema System), and the issues DEV-only, as `WireIssue`s (`to_wire_issues`)
|
|
296
296
|
6. Dispatch + DEV output validation + error normalization — `spec.side_effects` picks transaction vs pool. `ThrownJsonrpcError` preserves code + data; generic throws become `internal_error`
|
|
297
297
|
|
|
298
298
|
`PerformActionInput` carries `auth` (the request's `ResolvedAuth`, `null` for
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
* (`request_context.account.id`), settled by authentication, so the gate
|
|
28
28
|
* sits behind the authority gates by choice rather than necessity: a
|
|
29
29
|
* caller those gates refuse is answered 403, not 429.
|
|
30
|
-
* 5. **Validate params (400)** — first, object `params`
|
|
31
|
-
* `__proto__` key at any depth
|
|
32
|
-
*
|
|
30
|
+
* 5. **Validate params (400)** — first, one walk of object `params`
|
|
31
|
+
* (`scan_json_value`) refuses an own `__proto__` key at any depth, with
|
|
32
|
+
* `data.reason` `params_proto_key` (`ERROR_PARAMS_PROTO_KEY`), then
|
|
33
|
+
* U+0000 in any string or key, with `params_nul` (`ERROR_PARAMS_NUL`), on
|
|
33
34
|
* every input schema, before it runs; then
|
|
34
35
|
* `spec.input` parses the params (`parse`) with
|
|
35
36
|
* void / `?? {}` rules (`to_input_params`). A refusal is the generic
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perform_action.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/perform_action.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"perform_action.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/perform_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAS,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAGN,KAAK,cAAc,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGN,KAAK,YAAY,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOtC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAGvB,MAAM,oBAAoB,CAAC;AAkB5B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAgC,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,kEAAkE;IAClE,MAAM,EAAE,SAAS,CAAC;IAClB,qGAAqG;IACrG,UAAU,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,UAAU,EAAE,gBAAgB,CAAC;IAC7B;;;;;;OAMG;IACH,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,oGAAoG;IACpG,MAAM,EAAE,WAA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AOF,CAAC;AA6DF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,GAC1C,2BAA2B,aAAa,CAAC,MAAM,CAAC,KAC9C,kBAIA,CAAC;AAqEJ,0FAA0F;AAC1F,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB,GACnC,IAAI,gBAAgB,EACpB,QAAQ,mBAAmB,EAC3B,QAAQ,MAAM,EACd,KAAK,MAAM,KACT,sBAkBF,CAAC"}
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
* (`request_context.account.id`), settled by authentication, so the gate
|
|
28
28
|
* sits behind the authority gates by choice rather than necessity: a
|
|
29
29
|
* caller those gates refuse is answered 403, not 429.
|
|
30
|
-
* 5. **Validate params (400)** — first, object `params`
|
|
31
|
-
* `__proto__` key at any depth
|
|
32
|
-
*
|
|
30
|
+
* 5. **Validate params (400)** — first, one walk of object `params`
|
|
31
|
+
* (`scan_json_value`) refuses an own `__proto__` key at any depth, with
|
|
32
|
+
* `data.reason` `params_proto_key` (`ERROR_PARAMS_PROTO_KEY`), then
|
|
33
|
+
* U+0000 in any string or key, with `params_nul` (`ERROR_PARAMS_NUL`), on
|
|
33
34
|
* every input schema, before it runs; then
|
|
34
35
|
* `spec.input` parses the params (`parse`) with
|
|
35
36
|
* void / `?? {}` rules (`to_input_params`). A refusal is the generic
|
|
@@ -67,13 +68,13 @@ import { resolved_auth_scope, resolved_auth_session_hash } from '../auth/resolve
|
|
|
67
68
|
import { is_db_checkout_error } from '../db/db_checkout_error.js';
|
|
68
69
|
import { resolve_issues_invalid_reason } from '../schema_meta.js';
|
|
69
70
|
import { to_wire_issues } from '../schema_issues.js';
|
|
70
|
-
import {
|
|
71
|
+
import { scan_json_value, to_input_params } from '../http/schema_helpers.js';
|
|
71
72
|
import { rate_limit_ip_key } from '../http/ip_canonical.js';
|
|
72
73
|
import { dispatch_with_post_commit_rollback } from '../http/pending_effects.js';
|
|
73
74
|
import {} from '../http/jsonrpc.js';
|
|
74
75
|
import { create_jsonrpc_error_response, create_jsonrpc_response } from '../http/jsonrpc_helpers.js';
|
|
75
76
|
import { jsonrpc_error_messages, jsonrpc_error_code_to_http_status, http_status_to_jsonrpc_error_code, JSONRPC_ERROR_CODES, dev_only, to_thrown_jsonrpc_error } from '../http/jsonrpc_errors.js';
|
|
76
|
-
import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS, ERROR_CREDENTIAL_TYPE_REQUIRED, ERROR_PARAMS_PROTO_KEY, ERROR_TOKEN_SCOPE_REQUIRED } from '../http/error_schemas.js';
|
|
77
|
+
import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS, ERROR_CREDENTIAL_TYPE_REQUIRED, ERROR_PARAMS_NUL, ERROR_PARAMS_PROTO_KEY, ERROR_TOKEN_SCOPE_REQUIRED } from '../http/error_schemas.js';
|
|
77
78
|
import { is_public_auth, needs_actor, parse_acting } from '../http/auth_shape.js';
|
|
78
79
|
import { token_scope_admits_method, token_scope_method_capability } from '../auth/token_scope.js';
|
|
79
80
|
/**
|
|
@@ -173,17 +174,21 @@ export const perform_action = async (input, deps) => {
|
|
|
173
174
|
// a void input reads every empty shape as the no-arg call — see
|
|
174
175
|
// `to_input_params`.
|
|
175
176
|
//
|
|
176
|
-
//
|
|
177
|
-
//
|
|
178
|
-
// store it — a sink for
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
177
|
+
// One walk of object params refuses, on every input and ahead of the
|
|
178
|
+
// schema, an own `__proto__` key anywhere (a loose schema passes it
|
|
179
|
+
// through, so a schema alone would store it — a sink for any client that
|
|
180
|
+
// copies the value back with plain assignment), then U+0000 in any string
|
|
181
|
+
// or key (Postgres refuses it in `text` and `jsonb`, so the write would
|
|
182
|
+
// 500). Only an object is walked, so a non-object `params` is the schema's
|
|
183
|
+
// refusal, as the Rust twin's shape check answers it ahead of its walk.
|
|
184
|
+
if (typeof raw_params === 'object' && raw_params !== null && !Array.isArray(raw_params)) {
|
|
185
|
+
const scan = scan_json_value(raw_params);
|
|
186
|
+
if (scan.proto_key) {
|
|
187
|
+
return error_result(jsonrpc_error_messages.invalid_params('invalid params', { reason: ERROR_PARAMS_PROTO_KEY }));
|
|
188
|
+
}
|
|
189
|
+
if (scan.nul) {
|
|
190
|
+
return error_result(jsonrpc_error_messages.invalid_params('invalid params', { reason: ERROR_PARAMS_NUL }));
|
|
191
|
+
}
|
|
187
192
|
}
|
|
188
193
|
const params = to_input_params(spec.input, raw_params);
|
|
189
194
|
const parse_result = parse(spec.input, params);
|
package/dist/http/CLAUDE.md
CHANGED
|
@@ -21,7 +21,7 @@ effects, see ../../../docs/architecture.md.
|
|
|
21
21
|
- `http/route_errors.ts` — the route error map: `RouteErrorMap`, `resolve_route_error_map`, `resolve_app_route_error_maps`, `get_route_error_map`.
|
|
22
22
|
- `http/route_error_check.ts` — `check_route_error` (whether an error response is one its route's map declares, the rule the DEV error check and `assert_response_matches_spec` share; `ALWAYS_ACCEPTED_ERRORS`, `is_error_status`, `format_route_error_check`) `is_json_response`, and the test helpers' hono-free route lookup (`split_route_template` and `parse_route_param`, a template read segment by segment as Hono's `getPattern` reads it; `compile_route_path`; `compile_route_param_pattern`, a `{re}` grouped and anchored as `compile_route_path` reads it — Hono's RegExpRouter reading, stricter than TrieRouter's ungrouped `^re$`; `decode_route_path`, a path as Hono's router decodes it; `to_mounted_routes`; `find_mounted_route`), whose reading `resolve_valid_path` also fills params by. Hono-free and `esm-env`-free.
|
|
23
23
|
- `http/dev_route_error_check.ts` — `create_dev_route_error_check({route_specs, route_error_maps, log})`: the DEV-only outer error check, `null` outside DEV; `create_route_lookup`, its lookup by Hono's own router.
|
|
24
|
-
- `http/schema_helpers.ts` — shared schema introspection (null/void/strict/surface/middleware-applies), and `to_void_params` / `to_input_params` / `
|
|
24
|
+
- `http/schema_helpers.ts` — shared schema introspection (null/void/strict/surface/middleware-applies), and `to_void_params` / `to_input_params` / `scan_json_value` / `safe_parse_dropping_unknown_keys`.
|
|
25
25
|
- `http/json_text.ts` — `parse_json_text`: JSON text read as the Rust spine's `serde_json` reads it, refusing what `JSON.parse` accepts and serde refuses (an escaped lone surrogate in a string or key, a number out of `f64` range, nesting `JSON_DEPTH_LIMIT` (128) deep); one linear scan of the text after `JSON.parse` accepts it (`is_serde_json_text`), so a refused value under a duplicated key is seen and the cost stays a few milliseconds a MiB. `read_json_body(c.req)` reads a request body through it once per request (the authorization phase's `acting` read and input validation share it), as text, never `c.req.json()`. Every body and frame parse runs it: route input, the RPC POST body and `GET` `params`, WS frames. Hono-free, imports nothing.
|
|
26
26
|
- `http/middleware_spec.ts` — `MiddlewareSpec` interface.
|
|
27
27
|
- `http/body_limit.ts` — `create_body_limit_middleware(max_size)`: the `413` body cap `create_app_server` mounts, as `create_body_limit_middleware_spec(max_size)`, a `MiddlewareSpec` at `'*'` ahead of the other middleware, absent with `max_body_size: null`. Its hono-free shape, `body_limit_middleware_shape` (`http/body_limit_schema.ts`), declares its `413` `payload_too_large` and `400` `invalid_content_length`, so every route's error map carries both; `create_test_app_surface_spec` lists the same shape with a stub handler. Refuses on `Content-Length` without reading `c.req.raw.body` and answers `Connection: close` — `413` past the cap, `400` `ERROR_INVALID_CONTENT_LENGTH` when the value is not a plain run of ASCII digits (a length the cap cannot read, which Hono's `bodyLimit` would pass uncounted) — else falls through to Hono's `bodyLimit` (no `Content-Length`, or one beside `Transfer-Encoding`), which reads the body into memory up to the cap before the next middleware runs, so its `413` — no `Connection: close` — also precedes origin and auth. After the header `413` Node and Bun close at once (the header is what makes them — Bun 1.4.3 is the tested floor, an older Bun kept the connection and served the next request) and Deno closes once the declared body has arrived (../../../docs/security.md §Body Size Limiting).
|
|
@@ -299,7 +299,7 @@ confirmation.
|
|
|
299
299
|
|
|
300
300
|
### `ERROR_*` constants by category
|
|
301
301
|
|
|
302
|
-
- **Validation**: `ERROR_INVALID_REQUEST_BODY`, `ERROR_INVALID_JSON_BODY`, `ERROR_INVALID_ROUTE_PARAMS`, `ERROR_INVALID_QUERY_PARAMS`, `ERROR_PARAMS_PROTO_KEY` (RPC params)
|
|
302
|
+
- **Validation**: `ERROR_INVALID_REQUEST_BODY`, `ERROR_INVALID_JSON_BODY`, `ERROR_INVALID_ROUTE_PARAMS`, `ERROR_INVALID_QUERY_PARAMS`, `ERROR_PARAMS_PROTO_KEY` + `ERROR_PARAMS_NUL` (RPC params)
|
|
303
303
|
- **Auth**: `ERROR_AUTHENTICATION_REQUIRED`, `ERROR_INSUFFICIENT_PERMISSIONS`, `ERROR_CREDENTIAL_TYPE_REQUIRED`, `ERROR_RATE_LIMIT_EXCEEDED`, `ERROR_INVALID_CREDENTIALS`, `ERROR_PAYLOAD_TOO_LARGE`, `ERROR_INVALID_CONTENT_LENGTH`
|
|
304
304
|
- **Origin + bearer**: `ERROR_FORBIDDEN_ORIGIN`, `ERROR_INVALID_TOKEN`, `ERROR_ACCOUNT_NOT_FOUND`
|
|
305
305
|
- **Keeper/daemon**: `ERROR_KEEPER_ACCOUNT_NOT_FOUND`
|
|
@@ -325,7 +325,7 @@ Key helpers:
|
|
|
325
325
|
- `is_void_schema(schema)` — a `literal(undefined)` (what `s.void` is, a `meta` copy included; a kind check like `is_null_schema`, so an optional schema is not void); a void input declares a parameterless RPC method
|
|
326
326
|
- `to_void_params(raw_params)` — reads absent, `null`, and `{}` params of a void input as the no-arg call (`undefined`), passing any other shape through for the void schema to refuse — the twin of the Rust spine's `require_void_params`
|
|
327
327
|
- `to_input_params(input, raw_params)` — the one params normalizer every receiving end runs before the input parse (`parse`): `to_void_params` for a void input, else absent/`null` → `{}`; used by both the server dispatch core (`perform_action`) and the peer receive path (`ActionDispatcher`)
|
|
328
|
-
- `
|
|
328
|
+
- `scan_json_value(value)` → `JsonValueScan` (`{proto_key, nul}`) — one iterative walk (no recursion — `JSON.parse` nests deeper than the call stack) of a parsed JSON value for an own `__proto__` key in any object and U+0000 in any string or key; the dispatcher refuses such params with `ERROR_PARAMS_PROTO_KEY`, then `ERROR_PARAMS_NUL`, and route input validation a NUL body with `invalid_request_body`. Reads the parsed value, so of duplicate keys only the kept one counts. Twin of the Rust `fuz_http::scan_json_value`
|
|
329
329
|
- `safe_parse_dropping_unknown_keys(schema, value)` — the forward-compatible read of a remote-authored payload, returning `parse`'s `{ok, value}` / `{ok: false, issues}`: while every issue is an unknown key (`unknown_key_targets`), strips them from a copy and reparses — after the first parse that reports unknown keys, one schema-guided pass deletes every key a strict `object` doesn't name anywhere the schema reaches (entries, array items, record values, the `variant` option), as a parse reports at most a hundred issues; a key under a `union` is never stripped (the union fails as one issue of its own), and a later `pipe` stage is stripped only as reported — until nothing is left to strip, capped at `UNKNOWN_KEY_PASSES_MAX` passes (the last failure returned past it); any other issue still fails. Used for response `result`s (`ActionEvent`) and peer replies (`peer/ping`); matches serde's ignore-unknown-fields default on the Rust spine
|
|
330
330
|
- `is_strict_object_schema(schema)` — detects an `object` (not `strip_object` / `loose_object`); a `pipe` is read through to its first schema when no stage is a `transform` (so a refined `object` reads strict)
|
|
331
331
|
- `schema_to_surface(schema, {io?, source?, on_unrepresentable?}?)` — throws first on a value that is no schema (`assert_validation_schema`, naming `source`, so an assembled app's slot holding none fails boot as registration would refuse it, not as an unwritable JSON Schema); a schema → JSON Schema (`to_json_schema`), on the side `io` names (`'output'` by default), with `$schema` and `default` keys stripped recursively (defaults may be non-deterministic; `$schema` is snapshot noise). `null` for a null or void schema. A part JSON Schema can't say (an output-side transform, a `check`) is left out or written as `{}` (`unrepresentable: 'any'`) and reported to `on_unrepresentable`; a schema with nothing describable (`{}` from a schema other than `unknown`) or one the emitter refuses outright throws, prefixed with `source` — so a root-level transform output fails server assembly. It never answers `null` for a failure, which would read as "no input" and drop the schema from every suite that reads the surface
|
|
@@ -30,9 +30,16 @@ export declare const ERROR_INVALID_QUERY_PARAMS: "invalid_query_params";
|
|
|
30
30
|
/**
|
|
31
31
|
* An RPC call's `params` hold an own `__proto__` key, at any depth — refused
|
|
32
32
|
* by the dispatcher (`invalid_params`) before the input schema runs. See
|
|
33
|
-
* `
|
|
33
|
+
* `scan_json_value`.
|
|
34
34
|
*/
|
|
35
35
|
export declare const ERROR_PARAMS_PROTO_KEY: "params_proto_key";
|
|
36
|
+
/**
|
|
37
|
+
* An RPC call's `params` hold U+0000 in a string or a key, at any depth, which
|
|
38
|
+
* Postgres refuses to store — refused by the dispatcher (`invalid_params`)
|
|
39
|
+
* before the input schema runs, after the proto-key check. See
|
|
40
|
+
* `scan_json_value`; a route body holding one is `invalid_request_body`.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ERROR_PARAMS_NUL: "params_nul";
|
|
36
43
|
/** No valid session or bearer token. */
|
|
37
44
|
export declare const ERROR_AUTHENTICATION_REQUIRED: "authentication_required";
|
|
38
45
|
/** Authenticated but missing required role. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error_schemas.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/error_schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAYN,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,4CAA4C;AAC5C,eAAO,MAAM,0BAA0B,EAAG,sBAA+B,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,uBAA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AErD;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,YAAY,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,mBAAmB,GAAI,gEAOjC,wBAAwB,KAAG,KAAK,CAAC,YAAY,CAsC/C,CAAC"}
|
|
@@ -31,9 +31,16 @@ export const ERROR_INVALID_QUERY_PARAMS = 'invalid_query_params';
|
|
|
31
31
|
/**
|
|
32
32
|
* An RPC call's `params` hold an own `__proto__` key, at any depth — refused
|
|
33
33
|
* by the dispatcher (`invalid_params`) before the input schema runs. See
|
|
34
|
-
* `
|
|
34
|
+
* `scan_json_value`.
|
|
35
35
|
*/
|
|
36
36
|
export const ERROR_PARAMS_PROTO_KEY = 'params_proto_key';
|
|
37
|
+
/**
|
|
38
|
+
* An RPC call's `params` hold U+0000 in a string or a key, at any depth, which
|
|
39
|
+
* Postgres refuses to store — refused by the dispatcher (`invalid_params`)
|
|
40
|
+
* before the input schema runs, after the proto-key check. See
|
|
41
|
+
* `scan_json_value`; a route body holding one is `invalid_request_body`.
|
|
42
|
+
*/
|
|
43
|
+
export const ERROR_PARAMS_NUL = 'params_nul';
|
|
37
44
|
// --- Core: Authentication & authorization (auto-derived by auth middleware) ---
|
|
38
45
|
/** No valid session or bearer token. */
|
|
39
46
|
export const ERROR_AUTHENTICATION_REQUIRED = 'authentication_required';
|
package/dist/http/json_text.d.ts
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
* The check is one linear pass over the text after `JSON.parse` accepts it
|
|
15
15
|
* (`is_serde_json_text`): a few milliseconds a MiB, whatever the text holds.
|
|
16
16
|
*
|
|
17
|
+
* `"\u0000"` is not refused here: both parsers accept it. Postgres refuses it,
|
|
18
|
+
* so the input steps do, as an invalid value rather than invalid JSON
|
|
19
|
+
* (`scan_json_value` in `http/schema_helpers.ts`).
|
|
20
|
+
*
|
|
17
21
|
* @module
|
|
18
22
|
*/
|
|
19
23
|
/** The nesting depth `serde_json` refuses: a value nested this deep or deeper fails. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json_text.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/json_text.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"json_text.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/json_text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAwFpC;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OAM9C,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAE1E,qGAAqG;AACrG,MAAM,WAAW,eAAe;IAC/B,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5B;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,cAAc,CAgB3E,CAAC"}
|
package/dist/http/json_text.js
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
* The check is one linear pass over the text after `JSON.parse` accepts it
|
|
15
15
|
* (`is_serde_json_text`): a few milliseconds a MiB, whatever the text holds.
|
|
16
16
|
*
|
|
17
|
+
* `"\u0000"` is not refused here: both parsers accept it. Postgres refuses it,
|
|
18
|
+
* so the input steps do, as an invalid value rather than invalid JSON
|
|
19
|
+
* (`scan_json_value` in `http/schema_helpers.ts`).
|
|
20
|
+
*
|
|
17
21
|
* @module
|
|
18
22
|
*/
|
|
19
23
|
/** The nesting depth `serde_json` refuses: a value nested this deep or deeper fails. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route_spec.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/route_spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAW,IAAI,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGtE,OAAO,EAEN,KAAK,SAAS,EAEd,KAAK,UAAU,EACf,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAQ9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAYvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAGN,KAAK,SAAS,EACd,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAU;IAC1B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5C,kBAAkB,EAAE,KAAK,CAAC,iBA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CAAC,SAAS,CAAC,EACvB,qBAAqB,iBAAiB,EACtC,KAAK,MAAM,EACX,IAAI,EAAE,EACN,YAAY,oBAAoB,KAC9B,IA+EF,CAAC;AAkCF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,KAAG,KAAK,CAAC,SAAS,CAK3F,CAAC"}
|
package/dist/http/route_spec.js
CHANGED
|
@@ -24,7 +24,7 @@ import { is_db_checkout_error } from '../db/db_checkout_error.js';
|
|
|
24
24
|
import { ERROR_INVALID_JSON_BODY, ERROR_INVALID_REQUEST_BODY, ERROR_INVALID_ROUTE_PARAMS, ERROR_INVALID_QUERY_PARAMS, ERROR_INTERNAL_ERROR, ERROR_SERVICE_UNAVAILABLE, ERROR_UNSUPPORTED_CONTENT_TYPE } from './error_schemas.js';
|
|
25
25
|
import { is_post_content_type_refused } from './simple_request.js';
|
|
26
26
|
import { jsonrpc_error_code_to_http_status, jsonrpc_error_code_to_name, dev_only, to_thrown_jsonrpc_error } from './jsonrpc_errors.js';
|
|
27
|
-
import { is_null_schema } from './schema_helpers.js';
|
|
27
|
+
import { is_null_schema, scan_json_value } from './schema_helpers.js';
|
|
28
28
|
import { is_json_response } from './route_error_check.js';
|
|
29
29
|
import { dispatch_with_post_commit_rollback } from './pending_effects.js';
|
|
30
30
|
import { assert_route_auth_acting_biconditional, assert_route_auth_invariants } from './auth_shape.js';
|
|
@@ -131,7 +131,9 @@ const create_content_type_check = (spec) => {
|
|
|
131
131
|
* validated elsewhere, e.g. from `?params=` query string in RPC handlers)
|
|
132
132
|
* and for null-input routes (no body expected). For other routes with input
|
|
133
133
|
* schemas, returns a middleware that parses and validates the JSON body,
|
|
134
|
-
* storing the result on the context as `validated_input`.
|
|
134
|
+
* storing the result on the context as `validated_input`. A body that parses
|
|
135
|
+
* but holds U+0000 in a string or key is `invalid_request_body` ahead of the
|
|
136
|
+
* schema (`scan_json_value`), since Postgres refuses it. Input validation
|
|
135
137
|
* runs after the authorization phase and the post-authorization guards, so a
|
|
136
138
|
* caller they refuse never sees a parse failure; the authorization phase reads
|
|
137
139
|
* `acting` off the raw body itself (`read_route_acting` in
|
|
@@ -152,6 +154,10 @@ const create_input_validation = (input_schema, method) => {
|
|
|
152
154
|
if (typeof body !== 'object' || body === null || Array.isArray(body)) {
|
|
153
155
|
return c.json({ error: ERROR_INVALID_JSON_BODY }, 400);
|
|
154
156
|
}
|
|
157
|
+
// U+0000 in any string or key, which Postgres refuses to store, ahead of
|
|
158
|
+
// the schema, flat as the Rust spine's `parse_json_body` answers it
|
|
159
|
+
if (scan_json_value(body).nul)
|
|
160
|
+
return c.json({ error: ERROR_INVALID_REQUEST_BODY }, 400);
|
|
155
161
|
const result = parse(input_schema, body);
|
|
156
162
|
if (!result.ok) {
|
|
157
163
|
return c.json({
|
|
@@ -82,10 +82,16 @@ export declare const to_void_params: (raw_params: unknown) => unknown;
|
|
|
82
82
|
* @returns the value the input parse (`parse`) reads
|
|
83
83
|
*/
|
|
84
84
|
export declare const to_input_params: (input: AnySchema, raw_params: unknown) => unknown;
|
|
85
|
+
/** What one walk of a parsed JSON value finds (`scan_json_value`). */
|
|
86
|
+
export interface JsonValueScan {
|
|
87
|
+
/** An object holds an own `__proto__` key, at any depth (`ERROR_PARAMS_PROTO_KEY`). */
|
|
88
|
+
proto_key: boolean;
|
|
89
|
+
/** A string or an object key holds U+0000 (`ERROR_PARAMS_NUL`). */
|
|
90
|
+
nul: boolean;
|
|
91
|
+
}
|
|
85
92
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* (`ERROR_PARAMS_PROTO_KEY`).
|
|
93
|
+
* Walks a parsed JSON value once for the two things a request may not store,
|
|
94
|
+
* at any depth: an own `__proto__` key, and U+0000 in a string or a key.
|
|
89
95
|
*
|
|
90
96
|
* `JSON.parse` defines `"__proto__"` as an ordinary own key, but the first
|
|
91
97
|
* plain assignment that copies it (`target[key] = value`, as any shallow copy
|
|
@@ -94,15 +100,23 @@ export declare const to_input_params: (input: AnySchema, raw_params: unknown) =>
|
|
|
94
100
|
* own `constructor` or `prototype` key is inert on a plain object and is not
|
|
95
101
|
* checked.
|
|
96
102
|
*
|
|
103
|
+
* U+0000 is valid JSON (`"\u0000"`), but Postgres refuses it in `text` and in
|
|
104
|
+
* `jsonb`, so a value holding one fails its write with a 500. The dispatcher
|
|
105
|
+
* refuses either in `params` (`invalid_params`, the proto key first), and a
|
|
106
|
+
* route refuses a NUL in its JSON body (`invalid_request_body`), both after
|
|
107
|
+
* the authority gates as any input refusal is.
|
|
108
|
+
*
|
|
97
109
|
* Walks with an explicit stack rather than recursion: `JSON.parse` accepts
|
|
98
110
|
* nesting deep enough to overflow the call stack, and the walk is linear in
|
|
99
|
-
* the value's nodes, which the request body limit bounds.
|
|
100
|
-
*
|
|
111
|
+
* the value's nodes, which the request body limit bounds. It reads the parsed
|
|
112
|
+
* value, not the text, so of two duplicate keys only the kept one is walked —
|
|
113
|
+
* as on the Rust spine, whose `serde_json::Value` keeps the last too. The twin
|
|
114
|
+
* is `fuz_http::scan_json_value`.
|
|
101
115
|
*
|
|
102
116
|
* @param value - a value as `JSON.parse` produced it
|
|
103
|
-
* @returns
|
|
117
|
+
* @returns what the walk found
|
|
104
118
|
*/
|
|
105
|
-
export declare const
|
|
119
|
+
export declare const scan_json_value: (value: unknown) => JsonValueScan;
|
|
106
120
|
/**
|
|
107
121
|
* `parse(schema, value)`, except that keys the schema doesn't declare are
|
|
108
122
|
* dropped rather than refused — the forward-compatible read of a payload a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/schema_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAEN,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,MAAM,8BAA8B,CAAC;AAMtC;;;;;GAKG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M,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,SAAS,EAAE,UAAU,sBAAsB,KAAG,OA2BvF,CAAC;AAoBF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,YAAY,MAAM,KAAG,OAQxE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,OAM/D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GACjC,MAAM;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAA;CAAE,EAC/E,YAAY,MAAM,KAChB,OACyF,CAAC;AAE7F;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GACnC,MAAM;IACL,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CACtE,EACD,YAAY,MAAM,KAChB,OAAgG,CAAC"}
|
|
@@ -73,9 +73,8 @@ export const to_void_params = (raw_params) => {
|
|
|
73
73
|
*/
|
|
74
74
|
export const to_input_params = (input, raw_params) => is_void_schema(input) ? to_void_params(raw_params) : (raw_params ?? {});
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* (`ERROR_PARAMS_PROTO_KEY`).
|
|
76
|
+
* Walks a parsed JSON value once for the two things a request may not store,
|
|
77
|
+
* at any depth: an own `__proto__` key, and U+0000 in a string or a key.
|
|
79
78
|
*
|
|
80
79
|
* `JSON.parse` defines `"__proto__"` as an ordinary own key, but the first
|
|
81
80
|
* plain assignment that copies it (`target[key] = value`, as any shallow copy
|
|
@@ -84,18 +83,33 @@ export const to_input_params = (input, raw_params) => is_void_schema(input) ? to
|
|
|
84
83
|
* own `constructor` or `prototype` key is inert on a plain object and is not
|
|
85
84
|
* checked.
|
|
86
85
|
*
|
|
86
|
+
* U+0000 is valid JSON (`"\u0000"`), but Postgres refuses it in `text` and in
|
|
87
|
+
* `jsonb`, so a value holding one fails its write with a 500. The dispatcher
|
|
88
|
+
* refuses either in `params` (`invalid_params`, the proto key first), and a
|
|
89
|
+
* route refuses a NUL in its JSON body (`invalid_request_body`), both after
|
|
90
|
+
* the authority gates as any input refusal is.
|
|
91
|
+
*
|
|
87
92
|
* Walks with an explicit stack rather than recursion: `JSON.parse` accepts
|
|
88
93
|
* nesting deep enough to overflow the call stack, and the walk is linear in
|
|
89
|
-
* the value's nodes, which the request body limit bounds.
|
|
90
|
-
*
|
|
94
|
+
* the value's nodes, which the request body limit bounds. It reads the parsed
|
|
95
|
+
* value, not the text, so of two duplicate keys only the kept one is walked —
|
|
96
|
+
* as on the Rust spine, whose `serde_json::Value` keeps the last too. The twin
|
|
97
|
+
* is `fuz_http::scan_json_value`.
|
|
91
98
|
*
|
|
92
99
|
* @param value - a value as `JSON.parse` produced it
|
|
93
|
-
* @returns
|
|
100
|
+
* @returns what the walk found
|
|
94
101
|
*/
|
|
95
|
-
export const
|
|
102
|
+
export const scan_json_value = (value) => {
|
|
103
|
+
let proto_key = false;
|
|
104
|
+
let nul = false;
|
|
96
105
|
const stack = [value];
|
|
97
|
-
while (stack.length > 0) {
|
|
106
|
+
while (stack.length > 0 && !(proto_key && nul)) {
|
|
98
107
|
const current = stack.pop();
|
|
108
|
+
if (typeof current === 'string') {
|
|
109
|
+
if (!nul && current.includes('\0'))
|
|
110
|
+
nul = true;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
99
113
|
if (typeof current !== 'object' || current === null)
|
|
100
114
|
continue;
|
|
101
115
|
if (Array.isArray(current)) {
|
|
@@ -103,12 +117,16 @@ export const json_has_own_proto_key = (value) => {
|
|
|
103
117
|
stack.push(item);
|
|
104
118
|
continue;
|
|
105
119
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
const record = current;
|
|
121
|
+
for (const key of Object.keys(record)) {
|
|
122
|
+
if (key === '__proto__')
|
|
123
|
+
proto_key = true;
|
|
124
|
+
if (!nul && key.includes('\0'))
|
|
125
|
+
nul = true;
|
|
126
|
+
stack.push(record[key]);
|
|
127
|
+
}
|
|
110
128
|
}
|
|
111
|
-
return
|
|
129
|
+
return { proto_key, nul };
|
|
112
130
|
};
|
|
113
131
|
/**
|
|
114
132
|
* `parse(schema, value)`, except that keys the schema doesn't declare are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin_conformance.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/origin_conformance.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"origin_conformance.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/origin_conformance.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,EAgBN,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAMtC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,OAAO,EACN,wBAAwB,EAExB,KAAK,uBAAuB,EAC5B,MAAM,2BAA2B,CAAC;AAEnC,2CAA2C;AAC3C,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB;;;;;;;;;;;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,sBAAsB,CAmB9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACrC,QAAQ,aAAa,CAAC,sBAAsB,CAAC,EAC7C,QAAQ,aAAa,CAAC,OAAO,CAAC,EAC9B,SAAS,MAAM,KACb,IAiBF,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,iCAAiC,GAAG,wBAAwB,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,uCAAuC,GACnD,SAAS,iCAAiC,KACxC,IA6CF,CAAC"}
|
|
@@ -19,14 +19,20 @@ import '../assert_dev_env.js';
|
|
|
19
19
|
* A row may carry a `note` for the reader. The TS unit test reads the table
|
|
20
20
|
* directly; `describe_origin_conformance_cross_tests` sends every row to a
|
|
21
21
|
* backend's `_testing_origin_check` action and compares the answer, so the
|
|
22
|
-
* Rust spine is held to the same rows without reading this file.
|
|
22
|
+
* Rust spine is held to the same rows without reading this file. A row whose
|
|
23
|
+
* input holds U+0000 can't reach the action: the dispatcher refuses NUL in
|
|
24
|
+
* params (`params_nul`) before any handler, and that refusal is what the
|
|
25
|
+
* suite asserts for it. Its verdict is pinned by the TS unit test and by
|
|
26
|
+
* `fuz_http`'s own host and origin tests.
|
|
23
27
|
*
|
|
24
28
|
* @module
|
|
25
29
|
*/
|
|
26
30
|
import { readFileSync } from 'node:fs';
|
|
27
31
|
import { assert, describe, test } from 'vitest';
|
|
28
32
|
import { array, boolean, literal, min_length, min_value, nullable, number, object, optional, parse, parse_or_throw, pipe, safe_integer, string, union } from '@fuzdev/fuz_schema/schema.ts';
|
|
33
|
+
import { ERROR_PARAMS_NUL } from '../../http/error_schemas.js';
|
|
29
34
|
import { AllowedOriginsErrorKind } from '../../http/origin.js';
|
|
35
|
+
import { scan_json_value } from '../../http/schema_helpers.js';
|
|
30
36
|
import { cross_rpc_call } from './cross_rpc.js';
|
|
31
37
|
import { SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
32
38
|
import { TestingOriginCheckOutput, testing_origin_check_action_spec } from './testing_origin_check.js';
|
|
@@ -140,13 +146,20 @@ export const describe_origin_conformance_cross_tests = (options) => {
|
|
|
140
146
|
const transport = fixture.fresh_transport({ origin: null });
|
|
141
147
|
const headers = fixture.create_daemon_token_headers();
|
|
142
148
|
const answers = [];
|
|
149
|
+
const wire_checks = [];
|
|
143
150
|
for (const check of checks) {
|
|
151
|
+
if (scan_json_value(check.input).nul) {
|
|
152
|
+
const refused = await cross_rpc_call(transport, rpc_path, testing_origin_check_action_spec.method, check.input, headers);
|
|
153
|
+
assert.deepStrictEqual(refused.error?.data, { reason: ERROR_PARAMS_NUL }, `${check.label}: a NUL in params is refused before the action`);
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
wire_checks.push(check);
|
|
144
157
|
const res = await cross_rpc_call(transport, rpc_path, testing_origin_check_action_spec.method, check.input, headers);
|
|
145
158
|
assert.ok(res.ok, `${check.label}: RPC failed: ${JSON.stringify(res.error)}`);
|
|
146
159
|
const parsed = parse(TestingOriginCheckOutput, res.result);
|
|
147
160
|
answers.push(parsed.ok ? parsed.value : res.result);
|
|
148
161
|
}
|
|
149
|
-
assert_origin_conformance(
|
|
162
|
+
assert_origin_conformance(wire_checks, answers, 'backend');
|
|
150
163
|
});
|
|
151
164
|
});
|
|
152
165
|
};
|
package/dist/ui/AppShell.svelte
CHANGED
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
{:else}
|
|
330
330
|
<button
|
|
331
331
|
type="button"
|
|
332
|
-
class="app-shell-toggle
|
|
332
|
+
class="app-shell-toggle fixed bottom:0 left:0 icon_button plain border-radius:0 border_top_right_radius_sm"
|
|
333
333
|
aria-label="sidebar"
|
|
334
334
|
aria-keyshortcuts={keyboard_shortcut || undefined}
|
|
335
335
|
aria-expanded={sidebar_state.show_sidebar}
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<!-- TODO these flex values fix some layout cases so that the container is laid out like the button, but this is a partial solution -->
|
|
105
105
|
<div
|
|
106
106
|
{...popover_container_attrs}
|
|
107
|
-
class="
|
|
107
|
+
class="relative {popover_container_attrs?.class}"
|
|
108
108
|
{@attach popover.container}
|
|
109
109
|
>
|
|
110
110
|
{#if button}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* const popover = new Popover();
|
|
30
30
|
* </script>
|
|
31
31
|
*
|
|
32
|
-
* <div class="
|
|
32
|
+
* <div class="relative" {@attach popover.container}>
|
|
33
33
|
* <button type="button" {@attach popover.trigger({position: 'bottom', align: 'center'})}>
|
|
34
34
|
* toggle
|
|
35
35
|
* </button>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* const popover = new Popover();
|
|
30
30
|
* </script>
|
|
31
31
|
*
|
|
32
|
-
* <div class="
|
|
32
|
+
* <div class="relative" {@attach popover.container}>
|
|
33
33
|
* <button type="button" {@attach popover.trigger({position: 'bottom', align: 'center'})}>
|
|
34
34
|
* toggle
|
|
35
35
|
* </button>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.173.0",
|
|
4
4
|
"description": "fullstack app library",
|
|
5
5
|
"glyph": "🗝",
|
|
6
6
|
"logo": "logo.svg",
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@electric-sql/pglite": ">=0.4",
|
|
38
38
|
"@fuzdev/blake3-wasm": ">=0.2.0",
|
|
39
|
-
"@fuzdev/fuz_css": ">=0.
|
|
39
|
+
"@fuzdev/fuz_css": ">=0.76.0",
|
|
40
40
|
"@fuzdev/fuz_schema": "^0.5.6",
|
|
41
|
+
"@fuzdev/fuz_ui": ">=0.224.0",
|
|
41
42
|
"@fuzdev/fuz_util": ">=0.79.0",
|
|
42
43
|
"@fuzdev/pglet-wasm": ">=0.1.2",
|
|
43
44
|
"@hono/bun": ">=1",
|
|
@@ -59,6 +60,9 @@
|
|
|
59
60
|
"@fuzdev/fuz_css": {
|
|
60
61
|
"optional": true
|
|
61
62
|
},
|
|
63
|
+
"@fuzdev/fuz_ui": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
62
66
|
"@fuzdev/pglet-wasm": {
|
|
63
67
|
"optional": true
|
|
64
68
|
},
|
|
@@ -94,9 +98,9 @@
|
|
|
94
98
|
"@electric-sql/pglite": "^0.5.8",
|
|
95
99
|
"@fuzdev/blake3-wasm": "^0.2.0",
|
|
96
100
|
"@fuzdev/fuz_code": "^0.56.0",
|
|
97
|
-
"@fuzdev/fuz_css": "^0.
|
|
101
|
+
"@fuzdev/fuz_css": "^0.76.1",
|
|
98
102
|
"@fuzdev/fuz_schema": "^0.5.6",
|
|
99
|
-
"@fuzdev/fuz_ui": "^0.
|
|
103
|
+
"@fuzdev/fuz_ui": "^0.224.0",
|
|
100
104
|
"@fuzdev/fuz_util": "^0.79.1",
|
|
101
105
|
"@fuzdev/gro": "^0.225.0",
|
|
102
106
|
"@fuzdev/mdz": "^0.7.0",
|