@stonyx/rest-server 0.2.1-alpha.26 → 0.2.1-alpha.28

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/README.md CHANGED
@@ -82,14 +82,21 @@ Configuration is read from `stonyx/config` under `restServer`:
82
82
  | `caseSensitiveRoutes` | **Boolean** | `true` | Match route paths case-sensitively. Disable via `REST_CASE_SENSITIVE_ROUTES=false`. See [Route Matching Strictness](#route-matching-strictness) — **disabling this re-opens a security hole**. |
83
83
  | `strictRoutes` | **Boolean** | `true` | Match route paths strictly, so a trailing slash does not match a route registered without one. Disable via `REST_STRICT_ROUTES=false`. See [Route Matching Strictness](#route-matching-strictness) — **disabling this re-opens a security hole**, and note `GET /health/` now 404s. |
84
84
  | `canonicalRoutes` | **Boolean** | `true` | Reject a request whose raw target is not the canonical path express matched, before your `auth` hook runs. Disable via `REST_CANONICAL_ROUTES=false`. See [Route Matching Strictness](#route-matching-strictness) — **disabling this re-opens a security hole**, and note `GET /route/` at a mount root and every absolute-form request target now 404 on the routes this module registers (see the scope limit under [Upgrading](#upgrading-behaviour-changes)). |
85
- | `canonicalEncoding` | **Boolean** | `true` | Reject a request whose raw target percent-encodes an RFC 3986 §2.3 *unreserved* character (`A-Z a-z 0-9 - . _ ~`), before your `auth` hook runs. Disable via `REST_CANONICAL_ENCODING=false`. See [Route Matching Strictness](#route-matching-strictness) — **disabling this re-opens a security hole**, and note that a client over-encoding an unreserved character in a path now gets 404 (see [Upgrading](#upgrading-behaviour-changes)). |
85
+ | `canonicalEncoding` | **Boolean** | `true` | Reject a request whose raw target percent-encodes an RFC 3986 §2.3 *unreserved* character (`A-Z a-z 0-9 - . _ ~`), before your `auth` hook runs. Disable via `REST_CANONICAL_ENCODING=false`. See [Route Matching Strictness](#route-matching-strictness) — **disabling this re-opens a security hole**, and note that a client over-encoding an unreserved character in a path now gets 404 (see [Upgrading](#upgrading-behaviour-changes)). Like `canonicalRoutes` this is a **registration-site** control, not a global one: the check runs in the handlers mounted from your request classes, so a route registered directly on `RestServer.instance.api` gets none of it — measured, `GET /direct/%73ecret` → **200** with `id "secret"` while `GET /enc/%73ecret` → 404. |
86
86
  | `trustProxy` | **Boolean** | `false` | Trust reverse proxy headers (e.g. `X-Forwarded-Proto`). Enable via `REST_TRUST_PROXY=true` when running behind a load balancer such as AWS ALB/ELB to ensure correct protocol detection. |
87
87
  | `statusMap` | **Object** | `{}` | Optional mapping of HTTP status codes to custom messages |
88
88
 
89
89
  ### Route Matching Strictness
90
90
 
91
- Routes match **case-sensitively, strictly, only at their canonical target, and
92
- only at their canonical spelling by default**. Four controls, all on:
91
+ Routes match **case-sensitively, strictly, and only at their canonical target**
92
+ by default, and a raw target that percent-encodes an RFC 3986 §2.3 *unreserved*
93
+ character is rejected. Four controls, all on.
94
+
95
+ Note what that does **not** say. It is not "one accepted spelling per id", and
96
+ this module cannot give you that: reserved characters, non-ASCII bytes and
97
+ control octets all stay encodable, and every one of them whose hex carries a
98
+ letter digit aliases by hex-digit case. The residual is stated and measured
99
+ below, under [the residual](#the-residual-stated-plainly).
93
100
 
94
101
  | axis | control | example that no longer matches |
95
102
  |---|---|---|
@@ -246,19 +253,44 @@ segments and denies a request the router routed somewhere else entirely. And a
246
253
  hook that decodes *until stable* denies line three, which is a legitimately
247
254
  distinct id.
248
255
 
249
- **The residual, stated plainly: this does not give each id one spelling.**
250
- Because reserved characters must stay encodable, two different raw targets can
251
- still name the same record:
256
+ #### The residual, stated plainly
257
+
258
+ **This does not give each id one spelling.** The rule rejects an over-encoded
259
+ *unreserved* octet, which means every octet **outside** `A-Za-z0-9-._~` stays
260
+ encodable — and any such octet whose hex carries a letter digit therefore has
261
+ two accepted spellings, upper- and lower-case hex. **That is every reserved
262
+ character, every non-ASCII byte, and every control octet whose hex carries a
263
+ letter digit — not only the reserved ones.** It is not the whole complement of
264
+ `A-Za-z0-9-._~`: `%21` and `%40` carry no letter hex digit and alias
265
+ literal-versus-encoded instead, `%00` and `%09` keep exactly one accepted
266
+ spelling and do not alias at all, and `%90` is a 400. Two different raw targets
267
+ can still name the same record:
252
268
 
253
269
  ```
254
- GET /enc/a+b -> 200 id "a+b"
255
- GET /enc/a%2Bb -> 200 id "a+b" <- two accepted spellings, one id
256
- GET /enc/sec%2fret -> 200 id "sec/ret"
257
- GET /enc/sec%2Fret -> 200 id "sec/ret" <- hex-digit case, same id again
270
+ GET /enc/a+b -> 200 id "a+b"
271
+ GET /enc/a%2Bb -> 200 id "a+b" <- two accepted spellings, one id
272
+ GET /enc/sec%2fret -> 200 id "sec/ret"
273
+ GET /enc/sec%2Fret -> 200 id "sec/ret" <- hex-digit case, same id again
274
+
275
+ GET /i18n/caf%C3%A9 -> 401 hook denies this spelling
276
+ GET /i18n/caf%c3%a9 -> 200 id "café" <- same id, hook walked past
277
+ GET /i18n/%E5%8C%97%E4%BA%AC -> 401
278
+ GET /i18n/%e5%8c%97%e4%ba%ac -> 200 id "北京"
279
+ GET /i18n/a%0Db -> 401
280
+ GET /i18n/a%0db -> 200 id "a\rb" <- a CONTROL octet, same aliasing
258
281
  ```
259
282
 
260
- **So a hook comparing a raw path string is still unsound for any id containing a
261
- reserved character, and `req.params` is the sound comparison.** `req.params` is
283
+ The last six lines were measured against this module's shipped predicate on a
284
+ deny list holding **no reserved character at all** the three uppercase-hex
285
+ spellings, nothing else. If your ids are i18n text, or anything else that is not
286
+ pure `A-Za-z0-9-._~`, the residual applies to you. Reading it as "only affects
287
+ ids with a `/` or a `+` in them" is the mistake this paragraph exists to
288
+ prevent.
289
+
290
+ **So a hook comparing a raw path string is still unsound for any id carrying an
291
+ octet outside `A-Za-z0-9-._~` that keeps more than one accepted spelling —
292
+ reserved characters, non-ASCII bytes and control octets whose hex carries a
293
+ letter digit alike — and `req.params` is the sound comparison.** `req.params` is
262
294
  decoded by express and is populated *before* your `auth` hook runs, by design —
263
295
  compare that, and none of this applies to you. This module cannot close the
264
296
  residual for you without 404ing encodings clients are entitled to send; see
@@ -416,7 +448,7 @@ rather than left implied by the sections above.
416
448
  | you must | because | symptom if you don't |
417
449
  |---|---|---|
418
450
  | **Strip the query string** before comparing `req.originalUrl` to a fixed path in an `auth` hook | `canonicalRoutes` compares the query-*stripped* target — a query string is a legitimately variable part of a request target, and rejecting on it would 404 every `?`-carrying request | `GET /admin?x=1` reaches your guarded handler **unauthenticated**, 200, no error, no log. Measured identical before and after `canonicalRoutes` |
419
- | **Compare `req.params`, not a raw path string** | express decodes only `req.params`; `req.path` and `req.originalUrl` both stay percent-encoded. `canonicalEncoding` (#56) rejects an over-encoded *unreserved* character, but **reserved** characters must stay encodable, so one decoded id still has more than one accepted spelling: `GET /orders/a+b` and `GET /orders/a%2Bb` both run the handler with `id === "a+b"`, and `sec%2fret` / `sec%2Fret` both give `sec/ret` | your hook compares one spelling, the request arrives in another, and the handler runs **unauthenticated** — 200, no error, no log. Comparing `req.params.id` instead is immune by construction, and it is populated before `auth()` runs |
451
+ | **Compare `req.params`, not a raw path string** | express decodes only `req.params`; `req.path` and `req.originalUrl` both stay percent-encoded. `canonicalEncoding` (#56) rejects an over-encoded *unreserved* character, but every octet outside `A-Za-z0-9-._~` stays encodable — **reserved characters, non-ASCII bytes and control octets alike** — and every one of them whose hex carries a letter digit aliases by hex-digit case, so one decoded id still has more than one accepted spelling: `GET /orders/a+b` and `GET /orders/a%2Bb` both run the handler with `id === "a+b"`, `sec%2fret` / `sec%2Fret` both give `sec/ret`, and `caf%C3%A9` / `caf%c3%a9` both give `café`. The class is **not** limited to reserved characters — see [the residual](#the-residual-stated-plainly) | your hook compares one spelling, the request arrives in another, and the handler runs **unauthenticated** — 200, no error, no log. Comparing `req.params.id` instead is immune by construction, and it is populated before `auth()` runs |
420
452
  | **Compare param values with the same casing you look them up with** | param *values* are never case-normalized, and record ids are legitimately case-sensitive | `GET /orders/SECRET` runs the handler with `id === "SECRET"` while your hook compared `secret`. Note that lower-casing the value is **not** the fix: it false-denies a genuinely distinct `SECRET` record and, measured in a sibling module, false-allowed an encoded spelling at the same time |
421
453
  | **Return `undefined` from `auth()` to mean "authorized"** — never `0` | any integer return is sent as the HTTP status | returning `0` sends a `0` status rather than allowing the request |
422
454
 
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,OAAO,IAAI,cAAc,EAAE,KAAK,QAAQ,IAAI,eAAe,EAAqB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAOrI,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACtG,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,CAAC;AAC3F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;AAE9F,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,MAAM,CAAC,SAAS,SAAmB;IAEnC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,YAAY;IASlD,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAWrE,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAG,aAAa,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;;IA4B3B,aAAa,IAAI,IAAI;CAsHtB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,OAAO,IAAI,cAAc,EAAE,KAAK,QAAQ,IAAI,eAAe,EAAqB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAOrI,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACtG,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,CAAC;AAC3F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;AAE9F,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,MAAM,CAAC,SAAS,SAAmB;IAEnC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,YAAY;IASlD,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAWrE,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAG,aAAa,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;;IA4B3B,aAAa,IAAI,IAAI;CAoItB"}
package/dist/request.js CHANGED
@@ -119,8 +119,22 @@ export default class Request {
119
119
  // `next('router')` rather than a sendStatus that answers `text/plain`
120
120
  // and becomes an oracle. They are killed here by
121
121
  // `test/integration/rest-server-test.ts` #56 AC1.4 (the shape
122
- // deep-equal against a genuine miss) and AC1.5 (`/private/%66ailure`
123
- // -> 404 rather than the hook's own status), on a class WITH a hook.
122
+ // deep-equal against a genuine miss) and AC1.6
123
+ // (`/private/restricte%64` -> 404 rather than the hook's own 403),
124
+ // on a class WITH a hook.
125
+ //
126
+ // AC1.6, NOT AC1.5, and the difference is measured rather than
127
+ // reasoned. This comment named AC1.5 (`/private/%66ailure`) until
128
+ // #58's fix round; that assertion CANNOT fail for the relocation.
129
+ // For that request `private.ts`'s hook sees `req.path === '/%66ailure'`
130
+ // (no 505) and `req.params.id === 'failure'` (no 403), so it returns
131
+ // undefined and the relocated check still fires. Only
132
+ // `/private/restricte%64` trips a hook clause -- `req.params.id` is
133
+ // DECODED by express, so it equals `restricted` and answers 403 --
134
+ // which is what makes AC1.6 the assertion that reds. Measured: move
135
+ // this line below the `if (this.auth)` block, rebuild, and the suite
136
+ // reports 40 pass / 1 fail, the single failure being #56's AC1 with
137
+ // both of assertion 6's messages red and assertion 5 GREEN.
124
138
  if (shouldRejectEncoding(req))
125
139
  return next('router');
126
140
  // Run auth after route matching so request.params is populated
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8G,MAAM,SAAS,CAAC;AACrI,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,kBAAkB,EAAE,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEnG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAOnE,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,MAAM,CAAC,SAAS,GAAG,eAAe,CAAC;IAEnC,MAAM,CAAC,QAAQ,CAAC,GAAmB;QACjC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;QAC9B,MAAM,MAAM,GAAG,GAAyC,CAAC;QACzD,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,SAAS,CAAiB,CAAC;QAE9E,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC,SAAS,CAAiB,CAAC;IAC3C,CA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+209,49 @@ export declare function shouldRejectTarget(req: ExpressRequest): boolean;
209
209
  * own property separately.
210
210
  *
211
211
  * WHAT THIS DOES NOT CLOSE, stated here rather than left implied. It cannot
212
- * give each decoded id exactly one accepted spelling, because reserved
213
- * characters must remain encodable: `/enc/a+b` and `/enc/a%2Bb` both name the
214
- * id `a+b`, and `/enc/sec%2fret` and `/enc/sec%2Fret` both name `sec/ret`. So a
215
- * hook comparing a raw path string REMAINS UNSOUND for any id containing a
216
- * reserved character, and `req.params` -- which express decodes, and which is
217
- * populated before `auth()` runs -- is the sound idiom. That residual is the
218
- * consumer's comparison to own; the module cannot close it without 404ing
219
- * encodings clients are required to emit.
212
+ * give each decoded id exactly one accepted spelling, because everything the
213
+ * allowlist above does NOT cover must remain encodable: `/enc/a+b` and
214
+ * `/enc/a%2Bb` both name the id `a+b`, and `/enc/sec%2fret` and
215
+ * `/enc/sec%2Fret` both name `sec/ret`.
216
+ *
217
+ * THE RESIDUAL IS WIDER THAN "RESERVED CHARACTERS" AND MUST NOT BE WRITTEN
218
+ * DOWN THAT WAY. An octet outside `[A-Za-z0-9-._~]` keeps more than one
219
+ * accepted spelling when its hex carries a letter digit (upper- and lower-case
220
+ * hex) or when a client may also send it literally. That is every reserved
221
+ * character, every non-ASCII byte AND every control octet whose hex carries a
222
+ * letter digit. Measured through a real listener against this predicate, on a
223
+ * deny list holding NO reserved character at all:
224
+ *
225
+ * GET /i18n/caf%C3%A9 -> 401 GET /i18n/caf%c3%a9 -> 200, id "café"
226
+ * GET /i18n/%E5%8C%97%E4%BA%AC -> 401 GET /i18n/%e5%8c%97%e4%ba%ac -> 200, id "北京"
227
+ * GET /i18n/a%0Db -> 401 GET /i18n/a%0db -> 200, id "a\rb"
228
+ *
229
+ * A consumer whose ids are i18n text reads "any id containing a reserved
230
+ * character" as not applying to them. It does. The three docs that carried the
231
+ * narrow wording (`README.md`, `docs/project-structure.md`,
232
+ * `docs/agents/security-reviewer.md`) were widened to this scope rather than
233
+ * this comment being narrowed to theirs.
234
+ *
235
+ * NOT the whole complement of the unreserved set, and this qualifier is load-
236
+ * bearing rather than pedantry -- the sentence above is stated as measured, so
237
+ * it must not over-warn either. Measured counterexamples: `%21` and `%40` are
238
+ * reserved and carry no letter hex digit, so they alias literal-versus-encoded
239
+ * rather than by hex case; `%00` and `%09` have exactly one accepted spelling
240
+ * and do not alias at all; `%90` is a 400 (invalid UTF-8), not an alias.
241
+ *
242
+ * So a hook comparing a raw path string REMAINS UNSOUND for any id carrying an
243
+ * octet outside `[A-Za-z0-9-._~]` that keeps more than one accepted spelling,
244
+ * and `req.params` -- which express decodes, and which is populated before
245
+ * `auth()` runs -- is the sound idiom. That
246
+ * residual is the consumer's comparison to own; the module cannot close it
247
+ * without 404ing encodings clients are required to emit.
248
+ *
249
+ * SCOPE LIMIT, separate from the residual above: this predicate is called from
250
+ * `Request.registerCalls()`, so it covers the routes mounted from request
251
+ * classes and nothing else. A route registered directly on the public
252
+ * `RestServer.instance.api` gets none of it -- measured,
253
+ * `GET /direct/%73ecret` -> 200 with `id "secret"` while `GET /enc/%73ecret`
254
+ * -> 404. Same registration-site limit `canonicalRoutes` (#54) has.
220
255
  */
221
256
  export declare function shouldRejectEncoding(req: ExpressRequest): boolean;
222
257
  //# sourceMappingURL=route-matching.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-matching.d.ts","sourceRoot":"","sources":["../src/route-matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAG7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAuB/D;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAkBjE"}
1
+ {"version":3,"file":"route-matching.d.ts","sourceRoot":"","sources":["../src/route-matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAG7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAuB/D;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAkBjE"}
@@ -258,14 +258,49 @@ const PERCENT_TRIPLET = /%([0-9A-Fa-f]{2})/g;
258
258
  * own property separately.
259
259
  *
260
260
  * WHAT THIS DOES NOT CLOSE, stated here rather than left implied. It cannot
261
- * give each decoded id exactly one accepted spelling, because reserved
262
- * characters must remain encodable: `/enc/a+b` and `/enc/a%2Bb` both name the
263
- * id `a+b`, and `/enc/sec%2fret` and `/enc/sec%2Fret` both name `sec/ret`. So a
264
- * hook comparing a raw path string REMAINS UNSOUND for any id containing a
265
- * reserved character, and `req.params` -- which express decodes, and which is
266
- * populated before `auth()` runs -- is the sound idiom. That residual is the
267
- * consumer's comparison to own; the module cannot close it without 404ing
268
- * encodings clients are required to emit.
261
+ * give each decoded id exactly one accepted spelling, because everything the
262
+ * allowlist above does NOT cover must remain encodable: `/enc/a+b` and
263
+ * `/enc/a%2Bb` both name the id `a+b`, and `/enc/sec%2fret` and
264
+ * `/enc/sec%2Fret` both name `sec/ret`.
265
+ *
266
+ * THE RESIDUAL IS WIDER THAN "RESERVED CHARACTERS" AND MUST NOT BE WRITTEN
267
+ * DOWN THAT WAY. An octet outside `[A-Za-z0-9-._~]` keeps more than one
268
+ * accepted spelling when its hex carries a letter digit (upper- and lower-case
269
+ * hex) or when a client may also send it literally. That is every reserved
270
+ * character, every non-ASCII byte AND every control octet whose hex carries a
271
+ * letter digit. Measured through a real listener against this predicate, on a
272
+ * deny list holding NO reserved character at all:
273
+ *
274
+ * GET /i18n/caf%C3%A9 -> 401 GET /i18n/caf%c3%a9 -> 200, id "café"
275
+ * GET /i18n/%E5%8C%97%E4%BA%AC -> 401 GET /i18n/%e5%8c%97%e4%ba%ac -> 200, id "北京"
276
+ * GET /i18n/a%0Db -> 401 GET /i18n/a%0db -> 200, id "a\rb"
277
+ *
278
+ * A consumer whose ids are i18n text reads "any id containing a reserved
279
+ * character" as not applying to them. It does. The three docs that carried the
280
+ * narrow wording (`README.md`, `docs/project-structure.md`,
281
+ * `docs/agents/security-reviewer.md`) were widened to this scope rather than
282
+ * this comment being narrowed to theirs.
283
+ *
284
+ * NOT the whole complement of the unreserved set, and this qualifier is load-
285
+ * bearing rather than pedantry -- the sentence above is stated as measured, so
286
+ * it must not over-warn either. Measured counterexamples: `%21` and `%40` are
287
+ * reserved and carry no letter hex digit, so they alias literal-versus-encoded
288
+ * rather than by hex case; `%00` and `%09` have exactly one accepted spelling
289
+ * and do not alias at all; `%90` is a 400 (invalid UTF-8), not an alias.
290
+ *
291
+ * So a hook comparing a raw path string REMAINS UNSOUND for any id carrying an
292
+ * octet outside `[A-Za-z0-9-._~]` that keeps more than one accepted spelling,
293
+ * and `req.params` -- which express decodes, and which is populated before
294
+ * `auth()` runs -- is the sound idiom. That
295
+ * residual is the consumer's comparison to own; the module cannot close it
296
+ * without 404ing encodings clients are required to emit.
297
+ *
298
+ * SCOPE LIMIT, separate from the residual above: this predicate is called from
299
+ * `Request.registerCalls()`, so it covers the routes mounted from request
300
+ * classes and nothing else. A route registered directly on the public
301
+ * `RestServer.instance.api` gets none of it -- measured,
302
+ * `GET /direct/%73ecret` -> 200 with `id "secret"` while `GET /enc/%73ecret`
303
+ * -> 404. Same registration-site limit `canonicalRoutes` (#54) has.
269
304
  */
270
305
  export function shouldRejectEncoding(req) {
271
306
  // `!== false`, not `=== false` and not a truthy check: the polarity is the
@@ -1 +1 @@
1
- {"version":3,"file":"route-matching.js","sourceRoot":"","sources":["../src/route-matching.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,eAAe,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,GAAY;IACrD,IAAI,MAAM,CAAC,UAAU,EAAE,mBAAmB,KAAK,KAAK;QAAE,GAAG,CAAC,GAAG,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;IAC9F,IAAI,MAAM,CAAC,UAAU,EAAE,YAAY,KAAK,KAAK;QAAE,GAAG,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACjF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAmB;IACpD,6EAA6E;IAC7E,4EAA4E;IAC5E,8BAA8B;IAC9B,MAAM,QAAQ,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K,CAAC;IAChE,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,2EAA2E;IAC3E,wEAAwE;IACxE,8EAA8E;IAC9E,wEAAwE;IACxE,qEAAqE;IACrE,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7C,KAAK,MAAM,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACvD,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAI,EAAE,EAAE,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAClF,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "stonyx-async",
5
5
  "stonyx-module"
6
6
  ],
7
- "version": "0.2.1-alpha.26",
7
+ "version": "0.2.1-alpha.28",
8
8
  "description": "Rest Server Module for Stonyx Framework",
9
9
  "repository": {
10
10
  "type": "git",